commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Burch <>
Subject [Validator] Localhost and email/domain validation
Date Mon, 28 Mar 2011 14:09:59 GMT
Hi All

At the moment, the Email Validator considers @localhost email addresses to 
be invalid, due to the Domain Validator not considering it to be valid.

Initially I thought this was wrong for all cases, so I opened 
VALIDATOR-292 and attached a patch that fixed this. However, after a bit 
more thinking and some discussions with a friend who also uses the email 
validator, I began to think it might need to be configurable. For a 
development setup, and possibly also for an intranet setup, you likely do 
want @localhost email addresses to be considered valid. You possibly also 
want to allow @machinename ones too. However, for a public facing internet 
app setup you likely wouldn't want that.

What do people think on this? Should the Email Validator accept @localhost 
by default? And if not, what's the best way to allow the user to indicate 
that they do want that - another method (eg isValidLocal), overloading (eg
isValid(String, boolean acceptLocal) or something else?

(I'm happy to work up a new patch for whatever is felt best, I just don't 
know what that ought to be!)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message