Re: Email Validation for multiple emails (comma separated)
- From: ll <barn104_1999@xxxxxxxxx>
- Date: 31 May 2007 14:28:45 -0700
On May 30, 3:04 pm, Georgi Naumov <gonau...@xxxxxxxxx> wrote:
You can try to use the following regular expression:
/^[A-Z0-9\._%-]+@[A-Z0-9\.-]+\.[A-Z]{2,4}(?:(?:[,;][A-Z0-9\._%-]+@[A-
Z0-9\.-]+))?$/i
I not tested it but hope to work good for you.
P.P:
Sorry for my bad english.
Good Luck !
ll :
Hi,
I currently am using the following regex in js for email validation,
in which the email addresses can be separated by commas or
semicolons. The problem, however, lies in that I can type two emails
(as a run-on, with no comma or semicolon), and as long as it ends in a
three character domain, it is accepted as valid.
I wonder if there would be a way to make the comma or semicolon
mandatory if a second email address existed?
Many thanks for any help - Louis
Here is the script:
function checkEmailForErrors (Form,Field) {
var emailFilter2=/(([a-zA-Z0-9\-?\.?]+)@(([a-zA-Z0-9\-_]+\.)+)([a-z]
{2,3})(\W?[,;]\W?(?!$))?)+$/i;
var emailValue2=eval("document."+Form+"."+Field+".value");
if (!(emailFilter2.test(emailValue2))) {
return false;
}else{
return true;
}
}
Thanks very much for this - I am experimenting with it and will keep
you posted!
Regards,
Louis
.
- Follow-Ups:
- Prev by Date: Re: onChange in <input type="file"...>
- Next by Date: interaction with server-side c++ program
- Previous by thread: Re: onChange in <input type="file"...>
- Next by thread: Re: Email Validation for multiple emails (comma separated)
- Index(es):
Relevant Pages
|