Class MailAddressValidator

  • All Implemented Interfaces:
    IValidator, Serializable

    public class MailAddressValidator
    extends Object
    implements IValidator
    Validates mail address This class is constructed using default(noarguments) constructor and mail address is passed to validate function with optional rules The passed mail address is validated for authenticity and boolean value is returned accordingly.
    See Also:
    Serialized Form
    • Constructor Detail

      • MailAddressValidator

        public MailAddressValidator()
    • Method Detail

      • validate

        public boolean validate​(String value,
                                String rule)
        Determines if the value is a valid email address string
        Specified by:
        validate in interface IValidator
        Parameters:
        value - string value to validate
        rule - not used by this method
        Returns:
        true if the value represents a valid email address string
      • validate

        public boolean validate​(String addr)
        Check if the given email address is valid
        Parameters:
        addr - value to test
        Returns:
        true if the string contains valid email characters