Input validation with regular expressions

Please note: this feature is intended for advanced users only. Due to the inherently complex nature of regular expressions, Manic Design is unable to provide support for this feature. If you're interested in learning about regular expressions, we suggest visiting the Perl homepage, or obtaining a good book.


The format for regular expression matching is relatively simple:
    <INPUT TYPE=HIDDEN NAME=re VALUE="field1=re1::field2=re2::field3=re3::...">
For example, if you want to make sure a zip code is 5 digits long, and perform a reasonably complicated check that an email address is valid, you might write:
    <INPUT TYPE=HIDDEN NAME=re VALUE="zip=\d{5}::email=^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$">
Any verification failure will result in a friendly error message, prompting the user to use their back button and correct the problem or problems.

Main | Signup | Hosting | Design | Webmaster Resources | Contact Us!




Copyright © 1996-2000, Manic Design
support@manicdesign.com