E-mail & Phone Field Validation Problems
-
Hello,
I am having e-mail & phone field validation issues I hope you can help me with. I apologize ahead of time for the agonizingly long list.
E-mail Field
I am finding that the e-mail input field is not validating e-mail addresses properly. Native error-checking in browsers for the e-mail input field is very poor. They only check that the @ character is present in the field with a couple of characters before and after it and nothing else. Safari doesn’t recognize or support the e-mail input field at all – it only treats it as an ordinary text input with no validation for e-mail whatsoever.
The e-mail field allows partial addresses to pass:
as@a
Keep in mind that the poor error-checking is all native to the browser – but the problem persists in Caldera Forms.
Text Field with Regex
Since the e-mail input field didn’t work, I tried this next. I tried using the Regex example mask mentioned at the bottom of the form.
Hyphens and underscores are both valid for e-mail addresses, but the Regex mistakenly marks them as invalid when used in an e-mail address.
a@__.__
(3__)___-____
The above e-mail & phone examples will pass validation even though they shouldn’t. It isn’t a matter of typing in underscores – the existing underscores used as placeholders to instruct the user is enough. The form will submit.
Also, if an underscore or hyphen is explicitly typed in by the user as part of the e-mail address, the field will choke the keystrokes and not enter them in at all. Both characters are valid in e-mail addresses and both are commonly used.
Mobile
Predictive text when entering e-mails is also a problem. On Android, at least, when typing in the e-mail address, the input jumps back and forth along the field, entering characters in different places.
Phone Field
Same problem as above. Underscores can be left in the phone field and the form will pass validation and be submitted as shown in the example earlier.
Next Steps
In the meantime, as a stopgap measure, is there a way I can enter JavaScript Regex to help compensate for the problem? Can I add them in the mask field? I noticed you have a few selected Regex options for examples written under the mask field. Do I have the full range of JavaScript Regex open for me to use?
Please see if you can help me out on this issue.
My test page is: https://www.wkamenet.net/bug-test-form/
Thanks,
Wes
- The topic ‘E-mail & Phone Field Validation Problems’ is closed to new replies.