Search:

Type: Posts; User: ApacheTech; Keyword(s):

Search: Search took 0.01 seconds.

  1. Replies
    11
    Views
    22,222

    Try this: "phone" =>...

    Try this:


    "phone" => (preg_match('|^\s*(\(?\s*\d{1,4}\s*\)?\s*[\d\s]{5,10})\s*$|', $y)),


    It's tailored to Ireland's phone number format.
  2. Replies
    11
    Views
    22,222

    Here's a regular expression that should work: ...

    Here's a regular expression that should work:


    preg_match('|^\s*(\(?\s*\d{1,4}\s*\)?\s*[\d\s]{5,10})\s*$|', $phoneNumber);

    Or one even more tailored to Ireland, from...
  3. Replies
    11
    Views
    22,222

    To be honest with you, the only time you need to...

    To be honest with you, the only time you need to validate phone numbers is if you want to integrate them into a PBX or other dialing system. In that case, the exchange/PBX you are using will have a...
  4. Replies
    11
    Views
    22,222

    Which country are you validating for, different...

    Which country are you validating for, different country have very different ways of writing number.

    In UK alone, we have many different ways.

    (01234) 567890
    (01234) 567 890
    (0123) 4567...
Results 1 to 4 of 4