Class ValidateModelStateFilter
Filter to validate the ModelState. In case the model state is invalid, we send out a custom ApiResponse<TData> and log a propper message.
Inheritance
System.Object
ValidateModelStateFilter
Namespace: Celerik.NetCore.Web
Assembly: cs.temp.dll.dll
Syntax
public class ValidateModelStateFilter : IActionFilter
Methods
OnActionExecuted(ActionExecutedContext)
Called after the action executes, before the action result.
Declaration
public void OnActionExecuted(ActionExecutedContext context)
Parameters
Type | Name | Description |
---|---|---|
ActionExecutedContext | context | The context of the action filter. |
OnActionExecuting(ActionExecutingContext)
Called before the action executes, after model binding is completed.
Declaration
public void OnActionExecuting(ActionExecutingContext context)
Parameters
Type | Name | Description |
---|---|---|
ActionExecutingContext | context | The context of the action filter. |