style as code (#1776)

pull/1777/head
Rick Anderson 2016-08-11 18:37:18 -07:00 committed by GitHub
parent 636ec46dd1
commit edbf7b8adc
1 changed files with 1 additions and 1 deletions

View File

@ -58,7 +58,7 @@ MVC will continue validating fields until reaches the maximum number of errors (
Handling Model State Errors
---------------------------
Model validation occurs prior to each controller action being invoked, and it is the action methods responsibility to inspect ModelState.IsValid and react appropriately. In many cases, the appropriate reaction is to return some kind of error response, ideally detailing the reason why model validation failed.
Model validation occurs prior to each controller action being invoked, and it is the action methods responsibility to inspect ``ModelState.IsValid`` and react appropriately. In many cases, the appropriate reaction is to return some kind of error response, ideally detailing the reason why model validation failed.
Some apps will choose to follow a standard convention for dealing with model validation errors, in which case a filter may be an appropriate place to implement such a policy. You should test how your actions behave with valid and invalid model states.