One good example of where you might use the Java Script validation APIs is to verify that the user has provided the correct email address on a sign up form where they’re asked to enter it twice.
For example, in the The datalist element isn't an input type, but a list of suggested input values to associated with a form field.
values are provided as suggestions, and users are not restricted to the suggestions provided.
Several other common form features are provided by new attributes that would have previously required additional code.
The API allows you to do things like set a custom error, check whether an element is valid, and determine the reason that an element is invalid.
While there are Java Script helpers to do this, they can sometimes be annoying when they move focus after you’ve already started typing.
There is even more up to date forms guidance on our new Web Fundamentals site.