[
https://issues.apache.org/jira/browse/VALIDATOR-430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16210454#comment-16210454
]
Jason Klapste commented on VALIDATOR-430:
-----------------------------------------
We are using:
* DomainValidator.getInstance(true).isValid(plainDomain)
It doesn't matter to me where .test is added ;) I would assume though that a
user that is calling getInstance(false) because they want to validate a domain
has a valid TLD would not expect/want .test to return true given that it is not
a valid TLD.
I read "local" to mean around me, not specifically localhost, ie localization,
my local bar, etc hence the idea of adding to LOCAL_TLDS. INFRASTRUCTURE_TLDS,
GENERIC_TLDS, etc don't seem to be the right place given that not all use cases
would allow for them to be verified as valid. I guess you could also question
where .example could be added as technically that also should be considered
valid in some cases?
I do know about updateTLDOverride() but that method is not available to us
given that it can only be used before the first call to getInstance(). The
application we are working on is multi-threaded and I only have access to my
thread logic; I don't have access to change the app start up logic and there is
no guarantee that by the time my thread is called someone hasn't already called
getInstance(). I would prefer to use my own DomainValidator instance but that
would obviously require a large number of changes given everything is static :)
> Local domain TLDs should include "test"
> ---------------------------------------
>
> Key: VALIDATOR-430
> URL: https://issues.apache.org/jira/browse/VALIDATOR-430
> Project: Commons Validator
> Issue Type: Improvement
> Components: Routines
> Affects Versions: 1.6
> Reporter: Jason Klapste
>
> In addition to "localhost" and "localdomain", it would be helpful if "test"
> was added to the list of allowed local domains:
> * https://en.wikipedia.org/wiki/.test
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)