Click here to monitor SSC

prompt Valid Phone number using Javascript

Last post 02-13-2009, 4:53 PM by Phil Factor. 1 replies.
Sort Posts: Previous Next
  •  11-06-2008, 1:44 AM Post number 70370

    prompt Valid Phone number using Javascript

    i am having a aspx page in that im having a 2 text boxes

    ones mobile number and another is landline number

    i want a javascript code to enter a valid phone number

    im new to javascript plz help me

    thank u

  •  02-13-2009, 4:53 PM Post number 71988 in reply to post number 70370

    Re: prompt Valid Phone number using Javascript

    You can use a regex like this  /(\w{3}) ([\d]{1,2}) ([\d]{4})/im
    which matches  3334445555, 333.444.5555, 333-444-5555, 333 444 5555, (333) 444 5555 and so on
View as RSS news feed in XML