Tagged: form, phone number
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
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