In class, we have only scratched the surface of how to validate the data that a user enters in a form. For a variety of reasons, you sometimes want to know more exactly whether a user has entered in the type of data that you are expecting to receive from the form.
To do so, you need to use Regular Expressions. Regular Expressions syntax is almost an entire language in itself, and is very confusing to the uninitiated reader. There are thick books devoted to the topic available at most book stores, if you are so inclined.
This site does a decent (but not stellar) job of explaining how Regular Expressions are used.
http://www.regular-expressions.info/
Once you are familiar with the theory behind Regular Expressions, this page will instruct you on how to use them in Javascript.
http://www.regular-expressions.info/javascript.html
Saturday, October 11, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment