Last post Oct 24, 2007 09:21 PM by ilphrin
Oct 22, 2007 07:30 PM|BigMeat|LINK
I have an app that validates a email address in a textbox using the Regular Expression Validator set to internet email address. However I have some emil addresses that contain ampersands which I think are valid characters? However the asp.net validator
does not allow them, is an ampersand a valid character in an email address, if so how do i get round this.
Many thanks in adavance
Oct 22, 2007 08:40 PM|tfsmag|LINK
according to wikipedia an ampersand is a valid email character
you'll want to search regexlib.com
here's a good regex you could try i found on that site that will match "any" valid email address. I'm thinking the VS included one is pretty barebones and restricts alot.
Oct 22, 2007 09:21 PM|ilphrin|LINK
yes & is a valid character for the mailbox name in a domain,
you can use the following expression ".*@.*\..*" this basic validation expression will verify the basic e-mail address setup.
but this is just a Basic validation expression. you can change the validation expression from the VS one to that in the html code.
Oct 22, 2007 11:08 PM|BigMeat|LINK
Thanks guys, much appreciated
Oct 24, 2007 09:21 PM|ilphrin|LINK
did you find a good validation statement?