Expand my Community achievements bar.

How do I ensure my client must type in an @ sign in an email field?

Avatar

Former Community Member
Hi all,



I have created a text box that allows a person to submit an email. How do i perform a validation check that this person must type in at least an @ sign within the text field?



Thanks for reading.



Best Regards
1 Reply

Avatar

Former Community Member
I have done this through script and used a regular expression:



var objRegExp = /^\w(\.?[\w-])*@\w(\.?[\w-])*\.[a-z]{2,4}$/i



I'm not a big fan of the built in Validation pattern and error message properties. They never seem to give me the behaviour that I am looking for, so I typically end up scripting everything.