What Is The Meaning Of ModelState IsValid?

What Is The Meaning Of ModelState IsValid? ModelState. IsValid indicates if it was possible to bind the incoming values from the request to the model correctly and whether any explicitly specified validation rules were broken during the model binding process. In your example, the model that is being bound is of class type Encaissement .

What Is The Use Of ModelState IsValid In MVC?

What Is The Use Of ModelState IsValid In MVC? ModelState. IsValid tells you if any model errors have been added to ModelState . The default model binder will add some errors for basic type conversion issues (for example, passing a non-number for something which is an “int”). You can populate ModelState more fully based on