validate a form with javascript

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jazzi
Forum Newbie
Posts: 9
Joined: Mon Apr 25, 2011 6:56 am

validate a form with javascript

Post by jazzi »

how to validate simple html form with javascript
Validate Empty Field
Validate Alphabetic Value
Validate Range of Value
Validate Correct Numeric Value
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: validate a form with javascript

Post 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.
Post Reply