[ 
https://issues.apache.org/jira/browse/VALIDATOR-248?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Niall Pemberton reopened VALIDATOR-248:
---------------------------------------


I've just been looking at whats implemented for this and I don't really 
understand what is the point of the MANUAL_AUTHORITY_VALIDATION option. Seems 
unecessary to have to pass both an array of RegexValidators and set the 
MANUAL_AUTHORITY_VALIDATION. I would suggest we remove the 
MANUAL_AUTHORITY_VALIDATION option and assume that if the array of 
RegexValidators is not null then effectively the option has been set.

Also I think we should change it from being an array of RegexValidators to a 
single RegexValidator - you can sepcify an array of regex patterns in 
RegexValidator.

> Add an option to allow 'localhost' as a valid hostname part in the URL
> ----------------------------------------------------------------------
>
>                 Key: VALIDATOR-248
>                 URL: https://issues.apache.org/jira/browse/VALIDATOR-248
>             Project: Commons Validator
>          Issue Type: Improvement
>          Components: Routines
>    Affects Versions: 1.3.1 Release
>            Reporter: Sergey Nebolsin
>            Assignee: Ben Speakmon
>             Fix For: 1.4
>
>         Attachments: commons-validator-allow-localhost-r592416.patch, 
> commons-validator-allow-non-iana-tlds-r592416.patch, 
> VALIDATOR-248-refactoring.patch
>
>
> Working on Grails we've discovered 
> (http://jira.codehaus.org/browse/GRAILS-1692) that commons-validator's 
> UrlValidator rejects URLs like "http://localhost:8080/tau_gwi_00/clif/cb/19";. 
> I looked at commons-validator sources and found that any URL which contains 
> 'localhost' as it's hostname part will be rejected.
> RFC-2396 (http://www.ietf.org/rfc/rfc2396.txt) accepts 'localhost' as a valid 
> hostname (appendix G.3 paragraph 2 says that explicitly).
> So, it would be good to have additional option (UrlValidator.ALLOW_LOCALHOST) 
> which will control UrlValidator behavior on localhost URLs.

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

Reply via email to