You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Boyer <jo...@rodaxsoft.com> on 2014/10/11 04:20:44 UTC
FYI: Email Field Validator Always Fails in iOS 7 Safari Browser
Hi All:
We’re using the latest version of Struts 2 in production and we’ve found that the client-side XML email validator always fails in the iOS 7.1 Safari browser. We haven’t tested it iOS 8 yet. However, removing the email validation from the following XML solved the problem.
<field name="user.email">
<field-validator type="email">
<param name="trim">true</param>
<message>Email address is invalid</message>
</field-validator>
</field>
Incidentally, the XML email validator works fine in Safari for Mac OS X.
Have a nice weekend.
Regards,
John Boyer
rodaxsoft.com
Re: FYI: Email Field Validator Always Fails in iOS 7 Safari Browser
Posted by John Boyer <jo...@rodaxsoft.com>.
Thank you Lukasz. We started using the free Mailgun email validation service on our server because it checks for mistyped domains and performs other checks. Learn more at http://blog.mailgun.com/free-email-validation-api-for-web-forms
I’ve implemented a Java client for Mailgun’s email validation service and it’s available at https://github.com/johnboyer/mailgun-manager
John Boyer
rodaxsoft.com
On Oct 12, 2014, at 9:57 AM, Lukasz Lenart <lu...@apache.org> wrote:
> 2014-10-11 4:20 GMT+02:00 John Boyer <jo...@rodaxsoft.com>:
>> Hi All:
>>
>> We’re using the latest version of Struts 2 in production and we’ve found that the client-side XML email validator always fails in the iOS 7.1 Safari browser. We haven’t tested it iOS 8 yet. However, removing the email validation from the following XML solved the problem.
>>
>> <field name="user.email">
>> <field-validator type="email">
>> <param name="trim">true</param>
>> <message>Email address is invalid</message>
>> </field-validator>
>> </field>
>>
>> Incidentally, the XML email validator works fine in Safari for Mac OS X.
>
> This validator performs simple JS regex match on that expression [1] -
> so I would assume iOS 7.1 has broken regex engine ;-)
>
> [1] https://github.com/apache/struts/blob/09012d7e5f7177002893da3b2add091b04c62657/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java#L83
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: FYI: Email Field Validator Always Fails in iOS 7 Safari Browser
Posted by Lukasz Lenart <lu...@apache.org>.
2014-10-11 4:20 GMT+02:00 John Boyer <jo...@rodaxsoft.com>:
> Hi All:
>
> We’re using the latest version of Struts 2 in production and we’ve found that the client-side XML email validator always fails in the iOS 7.1 Safari browser. We haven’t tested it iOS 8 yet. However, removing the email validation from the following XML solved the problem.
>
> <field name="user.email">
> <field-validator type="email">
> <param name="trim">true</param>
> <message>Email address is invalid</message>
> </field-validator>
> </field>
>
> Incidentally, the XML email validator works fine in Safari for Mac OS X.
This validator performs simple JS regex match on that expression [1] -
so I would assume iOS 7.1 has broken regex engine ;-)
[1] https://github.com/apache/struts/blob/09012d7e5f7177002893da3b2add091b04c62657/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java#L83
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org