You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Marcel Huber (JIRA)" <ji...@apache.org> on 2010/11/13 17:14:14 UTC

[jira] Created: (TAP5-1347) Email Validation is not reliable

Email Validation is not reliable
--------------------------------

                 Key: TAP5-1347
                 URL: https://issues.apache.org/jira/browse/TAP5-1347
             Project: Tapestry 5
          Issue Type: Improvement
          Components: tapestry-core
    Affects Versions: 5.1.0.5
            Reporter: Marcel Huber


The Class org.apache.tapestry5.validator.Email a regex Pattern to validate a email address. This Regex is not reliable! For instance a email address like: 1111111111111@1111111.1111111111111 OR steve.jobs@app- are become valid!
I suggest to use the org.apache.commons.validator.EmailValidator.
In the Class org.apache.tapestry5.validator.Email I overwrote the validate function like this and the two email addresses are no more valid!

import org.apache.commons.validator.EmailValidator;
......
    public void validate(Field field, Void constraintValue, MessageFormatter formatter, String value)
            throws ValidationException
    {
    	EmailValidator ev = EmailValidator.getInstance();
        if (!ev.isValid(value)) throw new ValidationException(buildMessage(formatter, field));
    }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] [Closed] (TAP5-1347) Email Validation is not reliable

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1347.
--------------------------------------

    Resolution: Duplicate
      Assignee: Howard M. Lewis Ship
    
> Email Validation is not reliable
> --------------------------------
>
>                 Key: TAP5-1347
>                 URL: https://issues.apache.org/jira/browse/TAP5-1347
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Marcel Huber
>            Assignee: Howard M. Lewis Ship
>
> The Class org.apache.tapestry5.validator.Email a regex Pattern to validate a email address. This Regex is not reliable! For instance a email address like: 1111111111111@1111111.1111111111111 OR steve.jobs@app- are become valid!
> I suggest to use the org.apache.commons.validator.EmailValidator.
> In the Class org.apache.tapestry5.validator.Email I overwrote the validate function like this and the two email addresses are no more valid!
> import org.apache.commons.validator.EmailValidator;
> ......
>     public void validate(Field field, Void constraintValue, MessageFormatter formatter, String value)
>             throws ValidationException
>     {
>     	EmailValidator ev = EmailValidator.getInstance();
>         if (!ev.isValid(value)) throw new ValidationException(buildMessage(formatter, field));
>     }

--
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] (TAP5-1347) Email Validation is not reliable

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1347?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAP5-1347.
--------------------------------------

    Resolution: Duplicate
      Assignee: Howard M. Lewis Ship
    
> Email Validation is not reliable
> --------------------------------
>
>                 Key: TAP5-1347
>                 URL: https://issues.apache.org/jira/browse/TAP5-1347
>             Project: Tapestry 5
>          Issue Type: Improvement
>          Components: tapestry-core
>    Affects Versions: 5.1.0.5
>            Reporter: Marcel Huber
>            Assignee: Howard M. Lewis Ship
>
> The Class org.apache.tapestry5.validator.Email a regex Pattern to validate a email address. This Regex is not reliable! For instance a email address like: 1111111111111@1111111.1111111111111 OR steve.jobs@app- are become valid!
> I suggest to use the org.apache.commons.validator.EmailValidator.
> In the Class org.apache.tapestry5.validator.Email I overwrote the validate function like this and the two email addresses are no more valid!
> import org.apache.commons.validator.EmailValidator;
> ......
>     public void validate(Field field, Void constraintValue, MessageFormatter formatter, String value)
>             throws ValidationException
>     {
>     	EmailValidator ev = EmailValidator.getInstance();
>         if (!ev.isValid(value)) throw new ValidationException(buildMessage(formatter, field));
>     }

--
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