Pretty much all literature I've read on ASP.NET MVC over the years describes ModelState.IsValid as something that comes into play only with HTTP POST action methods. I understand this is the convention, but would assume ModelState.IsValid is also assigned -- and should be checked as necessary -- in HTTP GET action methods that involve model binding. Can anyone confirm this?
Readers should be reminded that the question has nothing to do with "updating".
ModelState.IsValid
isn't strictly related to validation attributes.
For readers that are looking for a simple answer to a simple question, I've confirmed in the debugger it is "yes" - ModelState.IsValid
is set for both GET and POST requests. As such, it should be explicitly checked in both cases, since exceptions will not be thrown when validation errors such as assigning the value "1,000" to a decimal? arise (see my comment above).