HMI.UI/DpUtil/FormGroupHelper.cs
@@ -62,7 +62,7 @@ { object content = fg.Content; object value = GetValidateValue(content); if (GetIsRequired(fg) && string.IsNullOrEmpty(value.ToString())) if (value != null && GetIsRequired(fg) && string.IsNullOrEmpty(value.ToString())) { fg.ValidateResult = ValidateResult.Error; fg.Message = $"{fg.Header}不能为空"; @@ -93,6 +93,7 @@ if (content is ComboBox cBox) return cBox.Text; if (content is Panel panel) return GetValidateValue(panel.Children); if (content is NumberInput numberInput) return numberInput.Value; return null; } }