Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2006
    Posts
    107
    Thanks
    1
    Thanked 0 Times in 0 Posts

    phone numer validation

    i want to validate phone number like:

    +92.3335240141

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,154
    Thanks
    203
    Thanked 2,548 Times in 2,526 Posts
    if (/\+\d{2}\.\d{10}/.test(phoneNumber.value)) { // valid

    or if you mean the number must start with +92 (Pakistan) then

    if (/\+92\.\d{10}/.test(phoneNumber.value)) {



    You can test your regular expressions at: http://www.ogauge.co.uk/regextester.html
    Last edited by Philip M; 07-04-2007 at 09:38 PM.

  • #3
    Regular Coder
    Join Date
    May 2006
    Posts
    107
    Thanks
    1
    Thanked 0 Times in 0 Posts
    not Pakistan it could be anything any country may be USA like +1.xxxxx


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •