mail id validation
-
hi all, im developing an application which has a textbox for mail id .i have a regular expression validator for that to check the mail id.my requirement is to check multiple mail id's if i enter into the textbox.i need java script for that.because with reg exp validator we can check only one mail id . please help me. with regards, susa
-
hi all, im developing an application which has a textbox for mail id .i have a regular expression validator for that to check the mail id.my requirement is to check multiple mail id's if i enter into the textbox.i need java script for that.because with reg exp validator we can check only one mail id . please help me. with regards, susa
Can you not just alter your regex to perform the check you are currently using for your e-mail string and then whatever separator character you are using being present many times in the string?
-
hi all, im developing an application which has a textbox for mail id .i have a regular expression validator for that to check the mail id.my requirement is to check multiple mail id's if i enter into the textbox.i need java script for that.because with reg exp validator we can check only one mail id . please help me. with regards, susa
Hi, Below is the javascript code for E-Mail validation, //Check for Proper Email Id //For this function Email id has to be passed
function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1) { //alert("Please enter a valid E-mail id.") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) { //alert("Please enter a valid E-mail id.") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(at,(lat+1))!=-1) { alert("Please enter a valid E-mail id.") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(dot,(lat+2))==-1) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(" ")!=-1) { alert("Please enter a valid E-mail id.") return false } return true }
Note: For multiple email ids u can split the email ids and send one by one to check. Hope this will hepl u...:) -
Hi, Below is the javascript code for E-Mail validation, //Check for Proper Email Id //For this function Email id has to be passed
function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1) { //alert("Please enter a valid E-mail id.") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr) { //alert("Please enter a valid E-mail id.") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(at,(lat+1))!=-1) { alert("Please enter a valid E-mail id.") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(dot,(lat+2))==-1) { alert("Please enter a valid E-mail id.") return false } if (str.indexOf(" ")!=-1) { alert("Please enter a valid E-mail id.") return false } return true }
Note: For multiple email ids u can split the email ids and send one by one to check. Hope this will hepl u...:)thank u all ,it is helping me a lot.it;s working with regards, susa