Constraint Validation in MVC Applications

Let’s learn about constraint validations in MVC applications.

We'll cover the following

Where to perform validations

Integrity constraints should be defined in the model classes of an MVC application since they’re part of the business semantics of a model class (representing a business object type). However, a more difficult question is where thedata validation should be performed. It can be performed in the database, the model classes, the controller, the user interface, or in all of them.

Get hands-on with 1400+ tech skills courses.