I seem to be able to submit invalid info using the autofill (I'm using chrome Version 71.0.3578.98 on a mac) that comes up when I select previously input data during filling out the form. I appreciate this might be beyond the capabilities of webform to get round this. In my previously entered data I have a phone number starting with a 0 (which is what you would type when phoning someone in the uk, from the uk), if I start to change it it correctly suggests it's invalid as I need to remove this 0, but with it filled in incorrectly I can go ahead and submit the form (well in my case go to the next page in the wizard), by doing so the phone number in the results has the 0 stripped, but no +44 (uk code) added. If I change it by removing the 0 it appears correctly with the +44.
I'm using the using the jQuery International Telephone Input plugin.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 3034377-8.patch | 11.29 KB | jrockowitz |
| #7 | 3034377-6.patch | 9.11 KB | jrockowitz |
| #5 | ScreenFlow.gif | 477.01 KB | jrockowitz |
| #5 | 3034377-5.patch | 3.82 KB | jrockowitz |
| #3 | 3034377-2.patch | 3.94 KB | jrockowitz |
Comments
Comment #2
jrockowitz commentedThe Webform module does not include any server-side validation for telephone numbers.
The attached patch adds very preliminary support for the Telephone Validation module. Please try it out an provide feedback.
BTW, the jQuery International Telephone library might still have a bug that should be resolved in the upstream code.
Comment #3
jrockowitz commentedComment #4
benjarlett commentedThanks for trying Jacob. I tried it... sadly it still allowed me to submit a telephone number of 7799000999 when chrome filled it in for me.
Comment #5
jrockowitz commented@benjarlett Did you install and enable the telephone validation module?
Below is the server-side validation error I am seeing when the form is submitted with 7799000999 chrome's autofill. The jQuery International Telephone library would have to update to fix the client-side validation issue.
The attached patch just fixes a minor bug.
Comment #7
jrockowitz commentedComment #8
jrockowitz commentedComment #10
jrockowitz commentedI committed the patch. Please download the latest dev release to review.
Comment #12
vasanthanand commentedHi @jrockowitz ,
I am using jQuery International Telephone Input plugin and the issue still exist that it allows submission even after the invalid phone number provided. Is there a patch available for it.
Please help me in getting it resolved.
Thank you so much in advance.
Regards.
Vasanth
Comment #13
jrockowitz commentedAre you using the latest dev release of the Webform module?
Did you install and enable the Telephone validation module?