Phone field validation

Discussion in 'jQuery' started by andreyp, Feb 23, 2011.

  1. #1
    Hi all,

    I am trying to edit a validation rule for the Phone field to allow different input formats like:

    (01xxxx) xxxx[x]
    (01xxx) xxxxx[x]
    (01x1) xxx xxxx
    (011x) xxx xxxx
    (02x) xxxx xxxx
    03xx xxx xxxx
    07xxx xxxxxx
    08xx xxx xxxx
    09xx xxx xxxx

    I only have this snipet of code that restricts the amount of digits they can input. But it doesn't allow inputs like (011x) xxx xxxx.

    x_C1HomeTel: {
    required: true,
    digits:true,
    rangelength: [10, 12]
    },
    The site was built by someone else so I am kind of lost.

    Any advice is appreciated.
     
    andreyp, Feb 23, 2011 IP