fix(module: form): exception during validation for some nullable types (#4137)

This commit is contained in:
James Yeung 2024-08-28 00:14:03 +08:00 committed by GitHub
parent d93817ad54
commit eb5b19ac59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 0 deletions

View File

@ -20,6 +20,11 @@ namespace AntDesign.Internal.Form.Validate
public override bool IsValid(object value)
{
if (value == null)
{
return true;
}
var type = value.GetType();
var typeMinValue = GetMinValueString(type);

View File

@ -20,6 +20,10 @@ namespace AntDesign.Internal.Form.Validate
public override bool IsValid(object value)
{
if (value == null)
{
return true;
}
var type = value.GetType();
var typeMaxValue = GetMaxValueString(type);