You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Martin Uhlir (JIRA)" <ji...@apache.org> on 2012/10/07 13:18:02 UTC

[jira] [Created] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Martin Uhlir created WW-3885:
--------------------------------

             Summary: Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
                 Key: WW-3885
                 URL: https://issues.apache.org/jira/browse/WW-3885
             Project: Struts 2
          Issue Type: Bug
          Components: Core Interceptors, Documentation
    Affects Versions: 2.3.4.1
            Reporter: Martin Uhlir


EmailValidator documentation specifies following regular expression to validate email addresses:
\\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b

but the actual implementation uses following regular expression:
\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b

which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).

The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:

\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir updated WW-3885:
-----------------------------

    Attachment:     (was: WW-3885-struts2-core.patch)
    
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471663#comment-13471663 ] 

Martin Uhlir edited comment on WW-3885 at 10/8/12 4:59 PM:
-----------------------------------------------------------

Providing patch files.

I had to tweak the regular expression a little bit, since the version which is provided in the documentation could not handle multiple subdomains (which results in unit tests failure).

The final proposed regular expression is:
\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.aero)|(\\.arpa)|(\\.asia)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.mobi)|(\\.museum)|(\\.name)|(\\.pro)|(\\.tel)|(\\.travel)|(\\.xxx)|(\\.nato)|(\\..{2}))$)\\b
                
      was (Author: stoupa91):
    Patch files
                  
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir closed WW-3885.
----------------------------

    
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>            Assignee: Lukasz Lenart
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472304#comment-13472304 ] 

Martin Uhlir edited comment on WW-3885 at 10/11/12 3:19 AM:
------------------------------------------------------------

I have created new patch files (ignore the previous ones) and made the regular expression evaluating the email address more readable.

Please, anyone review this regular expression:
{noformat}
\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*\\.([a-z]{2}|aero|arpa|asia|biz|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|nato|net|org|pro|tel|travel|xxx)$\\b
{noformat}

This patch even includes fixes for WW-3883 ('+' sign in the local-part of email address).
                
      was (Author: stoupa91):
    I have created new patch files (ignore the previous ones) and made the regular expression evaluating the email address more readable.

Please, anyone review this regular expression:
{noformat}
\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.aero|\\.arpa|\\.asia|\\.biz|\\.com|\\.coop|\\.edu|\\.gov|\\.info|\\.int|\\.jobs|\\.mil|\\.mobi|\\.museum|\\.name|\\.nato|\\.net|\\.org|\\.pro|\\.tel|\\.travel|\\.xxx|\\.[a-z]{2})$\\b
{noformat}

This patch even includes fixes for WW-3883 ('+' sign in the local-part of email address).
                  
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir updated WW-3885:
-----------------------------

    Attachment: WW-3885-xwork-core.patch
                WW-3885-struts2-core.patch
    
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir updated WW-3885:
-----------------------------

    Attachment: WW-3885-xwork-core.patch
                WW-3885-struts2-core.patch

Patch files for WW-3883 and WW-3885.
                
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir updated WW-3885:
-----------------------------

    Attachment:     (was: WW-3885-struts2-core.patch)
    
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471663#comment-13471663 ] 

Martin Uhlir edited comment on WW-3885 at 10/8/12 5:00 PM:
-----------------------------------------------------------

Providing patch files.

I had to tweak the regular expression a little bit, since the version which is provided in the documentation could not handle multiple subdomains (which results in unit tests failure).

The final proposed regular expression is:
{noformat}
\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.aero)|(\\.arpa)|(\\.asia)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.mobi)|(\\.museum)|(\\.name)|(\\.pro)|(\\.tel)|(\\.travel)|(\\.xxx)|(\\.nato)|(\\..{2}))$)\\b
{noformat}
                
      was (Author: stoupa91):
    Providing patch files.

I had to tweak the regular expression a little bit, since the version which is provided in the documentation could not handle multiple subdomains (which results in unit tests failure).

The final proposed regular expression is:
\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.aero)|(\\.arpa)|(\\.asia)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.mobi)|(\\.museum)|(\\.name)|(\\.pro)|(\\.tel)|(\\.travel)|(\\.xxx)|(\\.nato)|(\\..{2}))$)\\b
                  
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart resolved WW-3885.
-------------------------------

    Resolution: Fixed
      Assignee: Lukasz Lenart

Patches applies, thanks for your support!
                
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>            Assignee: Lukasz Lenart
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir updated WW-3885:
-----------------------------

    Description: 
EmailValidator documentation specifies following regular expression to validate email addresses:
{noformat}
\\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
{noformat}

but the actual implementation uses following regular expression:
{noformat}
\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
{noformat}

which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).

The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
{noformat}
\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
{noformat}

  was:
EmailValidator documentation specifies following regular expression to validate email addresses:
\\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b

but the actual implementation uses following regular expression:
\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b

which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).

The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:

\\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b

    
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Lukasz Lenart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lukasz Lenart updated WW-3885:
------------------------------

    Fix Version/s: 2.3.6
    
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471394#comment-13471394 ] 

Martin Uhlir commented on WW-3885:
----------------------------------

The original issue is actually related to the server side email address checking. For the client side checking /template/xhtml/form-close-validate.ftl should be updated as well with the same regular expression for validator.validatorType = "email".
                
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir updated WW-3885:
-----------------------------

    Attachment:     (was: WW-3885-xwork-core.patch)
    
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir updated WW-3885:
-----------------------------

    Attachment:     (was: WW-3885-xwork-core.patch)
    
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Uhlir updated WW-3885:
-----------------------------

    Attachment: WW-3885-struts2-core.patch
                WW-3885-xwork-core.patch

Patch files
                
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13474021#comment-13474021 ] 

Hudson commented on WW-3885:
----------------------------

Integrated in Struts2 #539 (See [https://builds.apache.org/job/Struts2/539/])
    WW-3885 Updates regexp to improves e-mail validation support (Revision 1396967)

     Result = UNSTABLE
lukaszlenart : 
Files : 
* /struts/struts2/trunk/core/src/main/resources/template/xhtml/form-close-validate.ftl
* /struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/validator/validators/EmailValidator.java
* /struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/validator/EmailValidatorTest.java

                
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>            Assignee: Lukasz Lenart
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (WW-3885) Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.

Posted by "Martin Uhlir (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/WW-3885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13472304#comment-13472304 ] 

Martin Uhlir commented on WW-3885:
----------------------------------

I have created new patch files (ignore the previous ones) and made the regular expression evaluating the email address more readable.

Please, anyone review this regular expression:
{noformat}
\\b^['_a-z0-9-\\+]+(\\.['_a-z0-9-\\+]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.aero|\\.arpa|\\.asia|\\.biz|\\.com|\\.coop|\\.edu|\\.gov|\\.info|\\.int|\\.jobs|\\.mil|\\.mobi|\\.museum|\\.name|\\.nato|\\.net|\\.org|\\.pro|\\.tel|\\.travel|\\.xxx|\\.[a-z]{2})$\\b
{noformat}

This patch even includes fixes for WW-3883 ('+' sign in the local-part of email address).
                
> Invalid email address validation (client side). EmailValidator regex implementation doesn't match documentation.
> ----------------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3885
>                 URL: https://issues.apache.org/jira/browse/WW-3885
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Documentation
>    Affects Versions: 2.3.4.1
>            Reporter: Martin Uhlir
>              Labels: patch
>             Fix For: 2.3.6
>
>         Attachments: WW-3885-struts2-core.patch, WW-3885-xwork-core.patch
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> EmailValidator documentation specifies following regular expression to validate email addresses:
> {noformat}
> \\b(^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}
> but the actual implementation uses following regular expression:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z0-9]{2,})|(\\.[A-Za-z0-9]{2,}\\.[A-Za-z0-9]{2,}))$)\\b
> {noformat}
> which is wrong, because this email address "aaa@aa.aaaaaaa" is being validated as a correct email address (I experience this issue in client side validation).
> The (more?) correct regular expression should be probably the one specified in the documentation, but care needs to be taken of the apostrophe for the front part of the email address as well. The resulting regular expression might be something like this:
> {noformat}
> \\b(^['_A-Za-z0-9-]+(\\.['_A-Za-z0-9-]+)*@([A-Za-z0-9-])+((\\.com)|(\\.net)|(\\.org)|(\\.info)|(\\.edu)|(\\.mil)|(\\.gov)|(\\.biz)|(\\.ws)|(\\.us)|(\\.tv)|(\\.cc)|(\\.aero)|(\\.arpa)|(\\.coop)|(\\.int)|(\\.jobs)|(\\.museum)|(\\.name)|(\\.pro)|(\\.travel)|(\\.nato)|(\\..{2,3})|(\\..{2,3}\\..{2,3}))$)\\b
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira