Hi,
I want to validate phone number in my project. I include some validations. Furthermore i want to check whether it exactly contains ONLY 10 digits.nothing more and nothing less.How should i include that?
if (document.form1.phone_number.value == '')
{
alert('Please fill in phone number!');
return false;
}
if(!document.form1.phone_number.value.match(/^[0-9]+$/)){
alert('Please enter only numbers');
return false;