robert brow

robert brow

  • NA
  • 8
  • 3.6k

Validating email address using Regular expression

May 8 2015 12:38 AM
Hi I just host my site with DiscountService.com.au
I need to validate two different domain email addresses using Regular Expression.
we have two domains e.g mydomain.com and newdomain.com.au

For single domain it is working as:

[RegularExpression(@"^[a-zA-Z0-9._%+-]+(@mydomain\.com)$", ErrorMessage = "Registration limited to mydomain")]

How can I add both of the domains, can anyone assist?

Answers (2)