Package com.networknt.schema.format
Class IPv6AwareEmailValidator
- java.lang.Object
-
- com.networknt.org.apache.commons.validator.routines.EmailValidator
-
- com.networknt.schema.format.IPv6AwareEmailValidator
-
- All Implemented Interfaces:
java.io.Serializable
class IPv6AwareEmailValidator extends EmailValidator
This is an extension of the Apache Commons Validator that correctly handles email addresses containing an IPv6 literal as the domain.Apache's
EmailValidatordelegates validation of the domain to itsDomainValidator, which is not aware that it is validating an email address, which has a peculiar way of representing an IPv6 literal.
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description IPv6AwareEmailValidator(boolean allowLocal, boolean allowTld)Creates a new IPv6AwareEmailValidator.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisValidDomain(java.lang.String domain)Returns true if the domain component of an email address is valid.-
Methods inherited from class com.networknt.org.apache.commons.validator.routines.EmailValidator
getInstance, getInstance, getInstance, isValid, isValidUser
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
isValidDomain
protected boolean isValidDomain(java.lang.String domain)
Description copied from class:EmailValidatorReturns true if the domain component of an email address is valid.- Overrides:
isValidDomainin classEmailValidator- Parameters:
domain- being validated, may be in IDN format- Returns:
- true if the email address's domain is valid.
-
-