To check, whether the user entered correct form of data, it’s must to apply form validation in any of the form. The expression is: /^[a-z A-Z] $/ The above expression checks whether the input characters in the string is alphabet or not.
function text Numeric(inputtext, alert Msg) // Function that checks whether input text is an alphabetic character or not.The script has a catalog of almost all the common validation types built-in.The idea is to create a set of “validation descriptors” associated with each element in a form.function input Alphabet(inputtext, alert Msg) // Function that checks whether input text includes alphabetic and numeric characters.function text Alphanumeric(inputtext, alert Msg) // Function that checks whether the input characters are restricted according to defined by user.For ‘selections’ like drop down and radio group, use an appropriate validation like ‘dontselect’ or ‘selone_radio’.This validation descriptor is valid only for drop down lists.For example, you can have an input field that should not be empty, should be less than 25 chars and should be alpha-numeric. In some dynamically programmed pages, it may be required to change the validations in the form at run time.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. 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.