Javascript code for validating name

It is important to validate the form submitted by the user because it can have inappropriate values. The Java Script provides you the facility the validate the form on the client side so processing will be fast than server-side validation.So, most of the web developers prefer Java Script form validation.This would need to put more logic to test correctness of data.Here in this tutorial I’ll show how to validate Username and Phone Fields on Form Submit Event?

The idea is to create a set of “validation descriptors” associated with each element in a form.The name can’t be empty and password can’t be less than 6 characters long. The user will not be forwarded to the next page until given values are correct.Using client side Java Script is an efficient way to validate the user input in web forms.When there are many fields in the form, the Java Script validation becomes too complex.The Java Script class presented here makes the form validations many times easier.Microsoft® Office Front Page® 2003 allows you to create some custom validation within the form feature.

You must have an account to comment. Please register or login here!