logo

New Response

« Return to the main article

You are replying to:

    • avatar
    • Jake Howlett
    • Posted on Tue 27 Feb 2007

    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

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: