Tagged: ,

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #310595

    I have problem with phone filed. Firsth of all is it possible to validate field by number of digits?. Second form is not giving error when phone field is empty.
    Please help. Thanks in advance

    #310643

    Hi,

    Open js/shortcodes.js and look for this line:

    if(!value.match(/^(\d|\s|\-|\/|\(|\)|\[|\]|e|x|t|ension|\.|\+|\_|\,|\:|\;)*$/))
    

    Replace it by this:

    if(value == '' || !value.match(/^(\d|\s|\-|\/|\(|\)|\[|\]|e|x|t|ension|\.|\+|\_|\,|\:|\;){8}$/))
    

    Change {8} by the valid number of digits you want to validate.

    Regards,
    Josue

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.