Reputation: 383
Good morning,
I would like to create a regular expression to validate an email address.... I can do this part using the standard "email" template in the asp control.
But what I would like to do is validate that the email is from a certain domain. Could anyone advise how I can - for example - make sure that an email is formed as [anyname]@mydomain.com?
Thanks Guy
Upvotes: 0
Views: 109
Reputation: 40970
So Basically you just need to validate that input string must be ended with @mydomain.com
, for that you can use $
and your validation expression would something like this
^[A-Za-z0-9._%+-][email protected]$
Upvotes: 1