IValidatorInterceptor
Specifies an interceptor that can be used to provide hooks that will be called before and after MVC validation occurs.
Assembly: ServiceStack.Mvc.dll
View Source
public interface IValidatorInterceptor
Methods
BeforeMvcValidation(ControllerContext, IValidationContext)
Invoked before MVC validation takes place which allows the ValidationContext to be customized prior to validation. It should return a ValidationContext object.
View Source
IValidationContext BeforeMvcValidation(ControllerContext controllerContext, IValidationContext validationContext)
Returns
ServiceStack.FluentValidation.IValidationContext: Validation Context
Parameters
Type | Name | Description |
---|---|---|
ControllerContext | controllerContext | Controller Context |
| | ServiceStack.FluentValidation.IValidationContext | validationContext | Validation Context
|
AfterMvcValidation(ControllerContext, IValidationContext, ValidationResult)
Invoked after MVC validation takes place which allows the result to be customized. It should return a ValidationResult.
View Source
ValidationResult AfterMvcValidation(ControllerContext controllerContext, IValidationContext validationContext, ValidationResult result)
Returns
ServiceStack.FluentValidation.Results.ValidationResult: Validation Context
Parameters
Type | Name | Description |
---|---|---|
ControllerContext | controllerContext | Controller Context |
| | ServiceStack.FluentValidation.IValidationContext | validationContext | Validation Context
| | ServiceStack.FluentValidation.Results.ValidationResult | result | The result of validation.
|