File tree 1 file changed +3
-4
lines changed
src/Components/Blazor/Validation/src 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,10 @@ public sealed class ValidateComplexTypeAttribute : ValidationAttribute
19
19
/// <inheritdoc />
20
20
protected override ValidationResult IsValid ( object value , ValidationContext validationContext )
21
21
{
22
- if ( ! ObjectGraphDataAnnotationsValidator . TryValidateRecursive ( value , validationContext ) )
23
- {
24
- throw new InvalidOperationException ( $ "{ nameof ( ValidateComplexTypeAttribute ) } can only used with { nameof ( ObjectGraphDataAnnotationsValidator ) } .") ;
25
- }
22
+ ObjectGraphDataAnnotationsValidator . TryValidateRecursive ( value , validationContext ) ;
26
23
24
+ // Validation of the properties on the complex type are responsible for adding their own messages.
25
+ // Therefore, we can always return success from here.
27
26
return ValidationResult . Success ;
28
27
}
29
28
}
You can’t perform that action at this time.
0 commit comments