Disable Automatic Model State Validation in ASP.NET Core 2.1 #aspnetcore

added by DotNetKicks
9/24/2018 5:39:19 AM

2 Kicks, 128 Views

ASP.NET Core 2.1 introduced the APIController attribute which performs automatic model state validation and in case of an invalid model state, responds with a 400 bad request error. When the controller is decorated with APIController attribute, the framework would automatically register a ModelStateInvalidFilter which runs on the OnActionExecuting event.


0 comments