File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
FluentValidation.AutoValidation.Mvc/src/Filters Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ public async Task OnActionExecutionAsync(ActionExecutingContext actionExecutingC
61
61
var hasAutoValidateAlwaysAttribute = parameterInfo ? . HasCustomAttribute < AutoValidateAlwaysAttribute > ( ) ?? false ;
62
62
var hasAutoValidateNeverAttribute = parameterInfo ? . HasCustomAttribute < AutoValidateNeverAttribute > ( ) ?? false ;
63
63
64
- if ( subject != null && parameterType . IsCustomType ( ) &&
64
+ if ( subject != null && parameterType != null && parameterType . IsCustomType ( ) &&
65
65
! hasAutoValidateNeverAttribute && ( hasAutoValidateAlwaysAttribute || HasValidBindingSource ( bindingSource ) ) &&
66
- serviceProvider . GetValidator ( parameterType ! ) is IValidator validator )
66
+ serviceProvider . GetValidator ( parameterType ) is IValidator validator )
67
67
{
68
68
// ReSharper disable once SuspiciousTypeConversion.Global
69
69
var validatorInterceptor = validator as IValidatorInterceptor ;
You can’t perform that action at this time.
0 commit comments