Hi folks, I have a field called EMAIL and I allow the user to enter multiple email address seperated by comma's, how can I use JS to validte the email syntax?
I use this as my email validation, and this works if the user enters ONE email. But what if they enter 'a@aol.com,b@bol.com,ca@aol.com'?
____________________________________
Just Imagine.
I use this as my email validation, and this works if the user enters ONE email. But what if they enter 'a@aol.com,b@bol.com,ca@aol.com'?
Code:
<SCRIPT LANGUAGE = "JavaScript">
function EmailValidate() {
if (document.thisform.email.value.indexOf("@") == -1 || document.thisform.email.value == "") {
alert("Please include a proper email address.");
return false;
}
}
</SCRIPT>
____________________________________
Just Imagine.