Form is a required field. Checking required fields
Using this script will allow you to analyze the completion of required form fields. Unlike many other form analyzers, in this version the validation is performed on the client side and not on the server side. And only if the required fields are filled in, the entered information is transmitted to the server. If the required fields are not filled in, a message is issued listing the empty fields and the form is not sent to the server.
I used this script when creating the website www.prtut.ru.
Script demo
In the example, all fields are required.
Description
To set required fields in the form, use the arbitrary required attribute, which is specified only for fields that require mandatory input. For example: