Nov 8th, 2011, 9:26 AM
I need to validate an e-mail field with the following format:
first.last@dfw.wa.gov
The expression I've come up with validates perfectly in regex validation tools, but when applied to the validation script it does not seem to work correctly.
rules.push("reg_exp,email,^([a-zA-Z-']+)\.([a-zA-Z-']+)@(dfw|DFW)\.(wa|WA)\.(gov|GOV)$,Please enter your WDFW e-mail address in the following format: first.last@dfw.wa.gov");
The first or last names may contain alpha characters, dashes and/or apostrophes. The validation script does not like the begin/end string characters but if I leave them out a person could enter name.name.name.name@dfw.wa.gov
Any advice would be appreciated!
first.last@dfw.wa.gov
The expression I've come up with validates perfectly in regex validation tools, but when applied to the validation script it does not seem to work correctly.
rules.push("reg_exp,email,^([a-zA-Z-']+)\.([a-zA-Z-']+)@(dfw|DFW)\.(wa|WA)\.(gov|GOV)$,Please enter your WDFW e-mail address in the following format: first.last@dfw.wa.gov");
The first or last names may contain alpha characters, dashes and/or apostrophes. The validation script does not like the begin/end string characters but if I leave them out a person could enter name.name.name.name@dfw.wa.gov
Any advice would be appreciated!