Validating 2 0 forms
In addition to providing instructions, validate user input to help users avoid mistakes.
HTML5 defines a range of built-in functionality to validate common types of input, such as email addresses and dates.
This means that validation needs to be carried out server-side as well.
Where possible, users should be able to check their own input and correct it if necessary.
This is useful for specific types of data patterns such as telephone numbers, postal codes, and serial numbers.
In the example below, the element specifies a particular format that matches car license plate (registration) numbers in Germany.
In addition, HTML5 validation helps users inputting data by providing specific controls, such as date pickers and custom on-screen keyboards.In addition, the attribute can be added to form controls, to programmatically indicate that they are required.