...
/Constraint Validation in MVC Applications
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.
A relational database management system (DBMS) performs data validation whenever there’s an attempt to change data in the database, provided that all relevant ...