The on Error attribute lets you specify a Java Script function to execute if an on Validate, on Blur, or on Submit validation fails.
For example, if you use the on Validate attribute to specify a Java Script function to handle input validation, you can also use the on Error attribute to specify a Java Script function to handle a failed validation (that is, when on Validate returns a False value).
Checking for form completion: The first step of form validation is to check, whether the user have entered information in all the fields or not.
If the string value is numeric, it will return true, otherwise it will return false.
The CGI script is still more reliable, as it always works regardless of whether Java Script is enabled on the client-side or not; but having this extra safety barrier is a nice thing to have in place.
In all cases, the form is called That's checking the value's equality with a null String (two single quotes with nothing between them).
It happens sometimes, when user forgets to choose option from the select feild.
In that case, the form should convey about issue so that user can take the action.
So, just to make sure that user entered the email address in the correct format, it’s necessary to include email validation code inside the validation codes.
A general expression to check valid email address is: /^[w-.