commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nick Burch (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (VALIDATOR-292) [PATCH] @localhost and @localhost.localdomain email addresses aren't correctly detected as valid
Date Mon, 16 May 2011 16:52:47 GMT

    [ https://issues.apache.org/jira/browse/VALIDATOR-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13034096#comment-13034096
] 

Nick Burch commented on VALIDATOR-292:
--------------------------------------

Following discussions with commons committers at the Apache Retreat, I've re-worked the patch
to follow the same design as validators such as the ISBN validator. By default, the domain
and email validators will continue to declare localhost as invalid (as they always have done).
For most people, this will be correct. For anyone running in a development environment (where
localhost is wanted to be valid), a boolean can be passed when fetching the validator instance
to toggle this. 

New patch for this pattern attached, along with unit tests.

> [PATCH] @localhost and @localhost.localdomain email addresses aren't correctly detected
as valid
> ------------------------------------------------------------------------------------------------
>
>                 Key: VALIDATOR-292
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-292
>             Project: Commons Validator
>          Issue Type: Bug
>          Components: Routines
>    Affects Versions: 1.4
>            Reporter: Nick Burch
>         Attachments: CommonsValidatorLocalhost.patch
>
>
> Email addresses of the form <something>@localhost and <something>@localhost.localdomain
are valid, but the Email Validator doesn't detect this.
> The attached patch fixes the underlying issue in the domain validator, and adds unit
tests for Domain + Email validation of these.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message