Answers for "mobile number pattern validation in javascript"

0

mobile number pattern validation in javascript

function phonenumber(inputtxt)
{
  var phoneno = /^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/;
  if((inputtxt.value.match(phoneno))
        {
      return true;
        }
      else
        {
        alert("message");
        return false;
        }
}
Posted by: Guest on May-12-2020
0

10 digit mobile number validation pattern in javascript

\(?\d+\)?[-.\s]?\d+[-.\s]?\d+
Posted by: Guest on January-04-2021

Code answers related to "mobile number pattern validation in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language