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
6161 var hasAutoValidateAlwaysAttribute = parameterInfo ? . HasCustomAttribute < AutoValidateAlwaysAttribute > ( ) ?? false ;
6262 var hasAutoValidateNeverAttribute = parameterInfo ? . HasCustomAttribute < AutoValidateNeverAttribute > ( ) ?? false ;
6363
64- if ( subject != null && parameterType . IsCustomType ( ) &&
64+ if ( subject != null && parameterType != null && parameterType . IsCustomType ( ) &&
6565 ! hasAutoValidateNeverAttribute && ( hasAutoValidateAlwaysAttribute || HasValidBindingSource ( bindingSource ) ) &&
66- serviceProvider . GetValidator ( parameterType ! ) is IValidator validator )
66+ serviceProvider . GetValidator ( parameterType ) is IValidator validator )
6767 {
6868 // ReSharper disable once SuspiciousTypeConversion.Global
6969 var validatorInterceptor = validator as IValidatorInterceptor ;
You can’t perform that action at this time.
0 commit comments