You are viewing this page out of context. To see it in the context it is intended please click here.
About This Page
Reply posted by Jake Howlett on Tue 27 Feb 2007 in response to Form Validator R3.0
Re: validating e-mail addresses
So your "fields" array could contain:{name: "myEmailField", type: "email", message: "Enter a valid email"},
{name: "myEmailField", type: "regex", pattern: /hotmail.com/, message: "Hotmail
not allowed"},
{name: "myEmailField", type: "regex", pattern: /\s/, message: "No white-space
allowed"}
The field would be validated three times. Although three message could appear
at once if all tests fail ;o)
To get round this use a type:"custom" test and write a custom function to test
the field.
Jake