javascript Validate Phone Number
function ValidatePhone(strString){
var strValidChars = "+()0123456789.ext ";
var strChar;
var blnResult = true;
if (strString.length < 11) return false;
for (i = 0; i < strString.length && blnResult == true; i++)
{
strChar = strString.charAt(i);
if (strValidChars.indexOf(strChar) == -1)
{
blnResult = false;
}
}
return blnResult;
}Validates a Phone Number
Updated: Friday 1st October 2010, 03:03pm
There are 0 comments
Comments are currently closed.