Please keep in mind that this doesn’t replace server-side validation.It’s still possible for a malicious user to manipulate or bypass the validation rules (e.g. The Java Script class presented here makes the form validations many times easier.The script has a catalog of almost all the common validation types built-in.
In this document, we have discussed Java Script Form Validation using a sample registration form.
The tutorial explores Java Script validation on submit with detail explanation.
Following pictorial shows in which field, what validation we want to impose.
In other words, in order to validate a field, you just associate a set of validation descriptors for each input field in the form. For such cases, a function is included which clears all validations in the validator object. Note that this validation if for fields like Textbox and multi-line text box.
For ‘selections’ like drop down and radio group, use an appropriate validation like ‘dontselect’ or ‘selone_radio’.