public class EmailAddressValidationCriteria extends Object
true
.EmailAddressValidationCriteria(boolean, boolean)
Modifier and Type | Field and Description |
---|---|
static EmailAddressValidationCriteria |
RFC_COMPLIANT
Criteria which is most RFC 2822 compliant and allows all compiant address forms, including the more exotic ones.
|
Constructor and Description |
---|
EmailAddressValidationCriteria(boolean allowDomainLiterals,
boolean allowQuotedIdentifiers) |
Modifier and Type | Method and Description |
---|---|
boolean |
isAllowDomainLiterals() |
boolean |
isAllowQuotedIdentifiers() |
public static final EmailAddressValidationCriteria RFC_COMPLIANT
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 © 2015. All rights reserved.