Table of Contents
For detecting non-admissible and inconsistent data and for preventing such data to be added to an application's database, we need to define suitable integrity constraints that can be used by the application's data validation mechanisms for catching these cases of flawed data. Integrity constraints are logical conditions that must be satisfied by the data entered by a user and stored in the application's database. For instance, if an application is managing data about persons including their birth dates and their death dates, if they have already died, then we must make sure that for any person record with a death date, this date is not before that person's birth date.
Unfortunately, many web application development frameworks do not provide sufficient support for defining integrity constraints and performing data validation. Integrity constraints should be defined in one (central) place in an app, and then be used for validating data in other parts of the app, such as in the database and in the user interface.
HTML5 provides support for validating user input in an HTML-based user interface (UI). Here, the goal is to provide immediate feedback to the user whenever invalid data has been entered into a form field. We call this UI mechanism responsive validation.