nau2nd
asked on
Validating Email
Hi I want to validate emails and I know how by using....
pattern="^[_a-z0-9-]+(\.[_ a-z0-9-]+) *@[a-z0-9- ]+(\.[a-z0 -9-]+)*\.( ([a-z]{2,3 })|(aero|c oop|info|m useum|name ))$">
but...
I need to validate only 4 different types of domains.
@duq.edu, @wduq.org, @library.duq.edu, and @mathcs.duq.edu
I got this from another expert....
pattern="^[_a-z0-9-]+(\.[_ a-z0-9-]+) *@duq.edu | ^[_a-z0-9-]+(\.[_a-z0-9-]+ )*@wduq.or g | ^[_a-z0-9-]+(\.[_a-z0-9-]+ )*@library .duq.edu | ^[_a-z0-9-]+(\.[_a-z0-9-]+ )*@mathcs. duq.edu"
unfortunately it doesn't work...
I need another suggestion....
pattern="^[_a-z0-9-]+(\.[_
but...
I need to validate only 4 different types of domains.
@duq.edu, @wduq.org, @library.duq.edu, and @mathcs.duq.edu
I got this from another expert....
pattern="^[_a-z0-9-]+(\.[_
unfortunately it doesn't work...
I need another suggestion....
how about this?
pattern="^[_a-z0-9-]+(\.[_ a-z0-9-]+) *@(duq.edu | wduq.org | library.duq.edu | mathcs.duq.edu)$"
pattern="^[_a-z0-9-]+(\.[_
ASKER
it still is not working
here is an email i try to input....i tried both solutions above and both will give me the validating message.
safura423@duq.edu
<cfinput type="text" name="EmpEmail" required="yes"
validate="regular_expressi on"
pattern="^[_a-z0-9-]+(\.[_ a-z0-9-]+) *@duq.edu$ | ^[_a-z0-9-]+(\.[_a-z0-9-]+ )*@wduq.or gu$ | ^[_a-z0-9-]+(\.[_a-z0-9-]+ )*@library .duq.edu$ | ^[_a-z0-9-]+(\.[_a-z0-9-]+ )*@mathcs. duq.edu$"
message="Please enter your Duquesne email address. For questions or to reports problems please contact Kathy Jaczesko at 412-396-5311 or jaczesko@duq.edu" value="" size="49">
here is an email i try to input....i tried both solutions above and both will give me the validating message.
safura423@duq.edu
<cfinput type="text" name="EmpEmail" required="yes"
validate="regular_expressi
pattern="^[_a-z0-9-]+(\.[_
message="Please enter your Duquesne email address. For questions or to reports problems please contact Kathy Jaczesko at 412-396-5311 or jaczesko@duq.edu" value="" size="49">
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The pattern I suggested, works with the examples provided by nau2nd. Therefore it is very likely to be the answer to the question.
Thanks.
Thanks.
Very similar, but with minor variations - because really that is the answer if you want to use the regular expression you stated.
^[_a-z0-9-]+(\.[_a-z0-9-]+
If it doesn't work then show some examples that are not working that you need to validate...