alielie
2025-03-03 1fca2167068e9ef2c079ec742f20313fc6697ab1
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;
        }
    }