Saturday, September 22, 2012

Email Validation For Group Mail

Email Address:

Example: Email1, Email2, Email3 etc




function ckhmailaddress(){

var emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
var allemail = $('#txtemail').val() ;
var email = allemail.split(",");
for(i=0 ; i< email.length ; i++){
if(emailPattern.test(email[i])==false){
   alert('please Enter Valid Email Id');
    document.getElementById('txtemail').focus();
    return false ;
   }
}

return true ;
 }


No comments:

Post a Comment

If you Satisfied , Please Leave a comment