Package com.sun.identity.sm
Class EmailValidator
- java.lang.Object
-
- com.sun.identity.sm.EmailValidator
-
- All Implemented Interfaces:
ServiceAttributeValidator
public class EmailValidator extends Object implements ServiceAttributeValidator
The classEmailValidatoris used to check if the Email address is syntactically correct according to valid format defined in RFC 822. Email address must contain an @ symbol as well as syntactically correct username and domain information e.g. name@domain.com
-
-
Constructor Summary
Constructors Constructor Description EmailValidator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanvalidate(String value)Validates an email address.booleanvalidate(Set<String> values)Validates a set of email address.
-
-
-
Method Detail
-
validate
public boolean validate(Set<String> values)
Validates a set of email address.- Specified by:
validatein interfaceServiceAttributeValidator- Parameters:
values- the set of string email address to validate- Returns:
- true if all of the email addresses are valid; false otherwise
-
validate
public boolean validate(String value)
Validates an email address.- Parameters:
value- an email address- Returns:
- true if the email address is valid; false otherwise
-
-