Hello From Raaj,
I have to some problem to write down the code of email validation. How can I check the email valid or not ? May you help me please. I have write the code of email validation . see here
<SCRIPT language="javascript">
function submitit()
{
var form=document.sendmail ;
if(form.to.value=="")
{
alert('Please Enter the Email Address');
return false;
}
if (form.to.value!="")
{
pass = form.to.value.indexOf('@',0);
pass1 = form.to.value.indexOf('.',0);

if((pass==-1) || (pass1==-1))
{
alert ("Not an valid Email Address");
form.to.focus();
return(false);

}
else if(form.from.value=="")
{
alert('Please Enter your Email Address');
return false;
}
if (form.from.value!="")
{
pass = form.from.value.indexOf('@',0);
if((pass==-1) )
{
pass1 = form.from.value.indexOf('.',0);
if(pass1==-1)
{
alert ("Not an valid email address");
form.from.focus();
return(false);
}
}
else
{
form.submit();
}
}
}
}
</SCRIPT>

This is my code. But this not working properly.
If I have given the aa.aa@ then he has taken. not check if true or not.
Please give me replly soon.
Thanks !

    This isnt a Javascript Forum..

    But anyway here is a function in PHP that Validates Emails.. No Email Validator can be for sure that the Email actually exists

    function validEmail($email)
    {
    	return preg_match("/^([a-zA-Z0-9])+([.a-zA-Z0-9_-])*@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+)+[a-zA-Z0-9_-]$/",$email);
    }
    
      Write a Reply...