[
https://issues.apache.org/jira/browse/VALIDATOR-459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166404#comment-17166404
]
Sebb commented on VALIDATOR-459:
--------------------------------
DomainValidator can be configured to add "local" to the list of valid local
TLDs.
However this would have to be done before first use, and would obviously apply
to all validations that allow local domains.
But it should solve your issue.
Now that additional DomainValidator instances can be created (VALIDATOR-471),
it would make sense to allow UrlValidator accept an externally created one.
> Allow UrlValidator/DomainValidator to skip the TLD validation
> -------------------------------------------------------------
>
> Key: VALIDATOR-459
> URL: https://issues.apache.org/jira/browse/VALIDATOR-459
> Project: Commons Validator
> Issue Type: Improvement
> Reporter: Christophe Lé
> Priority: Minor
>
> Hello there,
> One of my applications is validating URLs which can be on the internet OR in
> the same network. Those from the same network are ending with *.local*.
> Unfortunately, *.local* is not referenced anywhere in DomainValidator.
> Besides, whenever new TLDs are out, the library has to be updated with those.
> I was wondering if adding a flag to skip the TLD validation would be an
> interesting feature to have?
> # Whatever exotic internal TLD an application is using, if an URL points to
> nothing it doesn't matter since ultimately, the component which is going to
> initiate a network call will fail.
> # If people doesn't bother about the legitimacy of a TLD, they should not be
> _forced_ to update to the latest version of the library whenever a new TLD is
> out. Such action should be motivated for feature or security reasons.
> This flag would only be meaningful if you don't really care about the
> legitimacy of a TLD.
> What do you think?
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)