Browse Source

Skip when the item is null.

Fix #6033
pull/6065/head
maliming 6 years ago
parent
commit
87e8ba4ea0
  1. 2
      framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DataAnnotationObjectValidationContributor.cs

2
framework/src/Volo.Abp.Validation/Volo/Abp/Validation/DataAnnotationObjectValidationContributor.cs

@ -52,7 +52,7 @@ namespace Volo.Abp.Validation
foreach (var item in enumerable)
{
//Do not recursively validate for primitive objects
if (TypeHelper.IsPrimitiveExtended(item.GetType()))
if (item == null || TypeHelper.IsPrimitiveExtended(item.GetType()))
{
break;
}

Loading…
Cancel
Save