:: Forum >>

EMAIL VALIDATION..

if(myValidation.Phone.value.length == 0)
{
alert("Phone is empty");
myValidation.Phone.focus();
return false;
}

var strphone=myValidation.Phone.value
var phonechar=/^0\d{8,10}$/i
if (phonechar.test(strphone))
{
return true;
}
else
{
alert("phone code please!!");
myValidation.Phone.focus();
return false;
}


if(myValidation.eMail.value.length == 0)
{
alert("Please enter email address");
myValidation.eMail.focus();
return false;
}
Hi..
I am trying to figure out why the "eMail" statement doesn't work..
any idea?





var stremail=myValidation.eMail.value
var emailchar=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (emailchar.test(stremail))
{
return true;
}
else
{
alert("Invalid email address");
myValidation.eMail.focus();
return false;
}
}
SYSBOY
Thursday, June 2, 2005
Nice one.
Sunday, June 5, 2005

This topic is archived.


Back to support forum

Forum search