You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 27, 2020. It is now read-only.
Trevor Pilley edited this page May 20, 2014
·
1 revision
The ValidateModelStateAttribute validates the model state in a request and returns a HTTP 400 Bad Request if it is invalid, it saves having to wrap all your methods with if (ModelState.IsValid()).
There are times when you may want to opt out individual actions:
[ValidateModelState(SkipValidation = true)] // will only affect individual methods
public HttpResponseMessage Edit(int id, Model model) { ... }