public class EmailAddressValidationCriteria extends Object
true
.EmailAddressValidationCriteria(boolean, boolean)
Constructor and Description |
---|
EmailAddressValidationCriteria(boolean allowDomainLiterals,
boolean allowQuotedIdentifiers) |
public EmailAddressValidationCriteria(boolean allowDomainLiterals, boolean allowQuotedIdentifiers)
allowDomainLiterals
-
someone@[192.168.1.100] or
john.doe@[23:33:A2:22:16:1F] or
me@[my computer]
The RFC says these are valid email addresses, but most people don't like allowing them. If you don't want to allow them, and only want to allow valid domain names (RFC 1035, x.y.z.com, etc), change this constant to false.
Its default value is true to remain RFC 2822 compliant, but you should set it depending on what you need for your application.
allowQuotedIdentifiers
- "John Smith" <[email protected]>
The RFC says this is a valid mailbox. If you don't want to allow this, because for example, you only want users to enter in a raw address ([email protected] - no quotes or angle brackets), then change this constant to false.
Its default value is true to remain RFC 2822 compliant, but you should set it depending on what you need for your application.
Copyright © 2012. All Rights Reserved.