I am trying to use ASP MVC 2 data annotations to check a client-side comma separated list of email addresses. The regular expression below works on the server side, but does not work with javascript, because javascript regular expressions do not support conventions.
^([A-Za-z0-9_\\+\\-]+(\\.[A-Za-z0-9_\\+\\-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9]+)*\\.([A-Za-z]{2,4})(?(?=.);[ ]*|))+$
Is there a way to require that an e-mail address is followed by a semicolon only if it is followed by a different e-mail address without using a conditional expression? Thank.
source
share