Hiya, i have this function:
function telephoneValidator(formObj)
{
if (formObj.Telephone.value.length < 10)
{
alert("Please enter a valid Telephone number. Telephone numbers should be at least 10 digits and no more than 18 digits in length.");
formObj.Telephone.focus();
return (false);
}
return (true);
}
i would like to validate it further by making sure there is a leading 0 (zero) at the beginning of the number (like 01256354212), the digits should not exceed 18, so far i've been able to validate only <10 and finally only numbers allowed.
Can anybody help? Thx
function telephoneValidator(formObj)
{
if (formObj.Telephone.value.length < 10)
{
alert("Please enter a valid Telephone number. Telephone numbers should be at least 10 digits and no more than 18 digits in length.");
formObj.Telephone.focus();
return (false);
}
return (true);
}
i would like to validate it further by making sure there is a leading 0 (zero) at the beginning of the number (like 01256354212), the digits should not exceed 18, so far i've been able to validate only <10 and finally only numbers allowed.
Can anybody help? Thx