Page 1 of 1

validate a form with javascript

Posted: Thu Apr 28, 2011 4:51 am
by jazzi
how to validate simple html form with javascript
Validate Empty Field
Validate Alphabetic Value
Validate Range of Value
Validate Correct Numeric Value

Re: validate a form with javascript

Posted: Thu Apr 28, 2011 12:20 pm
by califdon
Most string validation can be done in Javascript with the RegExp (Regular Expression) features of the language. Seehttp://www.javascriptkit.com/javatutors/re.shtml. For numeric validation, just use ordinary arithmetic.