Opened 9 years ago
Last modified 8 years ago
#35201 new enhancement
Mobile email validation
Reported by: | njbebop | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Formatting | Keywords: | |
Focuses: | Cc: |
Description
While testing form submission through Samsung Android devices (Galaxy S6 Edge and Galaxy Note 5), we noticed that when user selects their email from the field history dropdown, it appends a space at the end of the email address. This invalidates the email when using the is_email validation function in wp-includes/formatting.php.
A fix I am currently using is simply adding a trim function to the email address in the first line of the function...
$email = trim($email);
This resolves the Samsung bug and passes the email validation. I hope this helps.
Attachments (1)
Change History (4)
#1
@
9 years ago
- Focuses accessibility removed
- Keywords reporter-feedback added
Thanks for the report, @njbebop.
Can you let us know which form this problem appears on? Is it a custom form in a plugin/theme, or one of the forms in WordPress itself? Thanks!
#2
@
9 years ago
Hi John,
The form is a checkout form for WP E-Commerce plugin. However, tracing back the validation for the form, it uses the is_email function in formatting.php.
We don't use any other forms on our site, Wordpress or plugins. I coded all the contact forms on the site from scratch. I also had to address the same issue with my email validation javascript code. For some reason, the Samsung Galaxy series of phones append that pesky space at the end of the email address, and the regex space check doesn't like it.
If you need any other information, let me know.
Thanks,
John Hurley
Updated formatting.php file