The algorithm that browsers run to determine the validity of a form when it is submitted is called constraint validation. To constrain data or check validity, the algorithm utilizes new HTML5 attributes such as
required, as well as existing attributes such as
In HTML5, basic constraints are declared in two different ways:
typeattribute of the
Nowadays, an increasing number of browsers are supporting the constraint validation API, ...