Class EmailValidator

  • All Implemented Interfaces:
    ServiceAttributeValidator

    public class EmailValidator
    extends Object
    implements ServiceAttributeValidator
    The class EmailValidator is 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 Detail

      • EmailValidator

        public EmailValidator()
    • Method Detail

      • validate

        public boolean validate​(Set<String> values)
        Validates a set of email address.
        Specified by:
        validate in interface ServiceAttributeValidator
        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