lib/active-model-email-validator.rb
def valid?(value)
    # Allow blank values to pass through.
    return(true) if value.blank?

    # Disallow unparseable addresses.
    begin
      parse_address(value)
    rescue unparseable_address
      return(false)
    end

    # Make sure the domain in the address is reasonable.
    domain_present? && domain_has_more_than_one_component?
  end
# The interface that `ActiveModel::Validations` uses to invoke the validation. This method is not called directly.
The interface that `ActiveModel::Validations` uses to invoke the validation. This method is not called directly.
The interface that ` ActiveModel :: Validations ` uses to invoke the validation . This method is not called directly .
def valid?(value)
    return(true) if value.blank?
    begin
      parse_address(value)
    rescue unparseable_address
      return(false)
    end
    domain_present? && domain_has_more_than_one_component?
  end
def valid? ( value ) return ( true ) if value . blank? begin parse_address ( value ) rescue unparseable_address return ( false ) end domain_present? && domain_has_more_than_one_component? end
The interface that `ActiveModel::Validations` uses to invoke the validation.
The interface that ` ActiveModel :: Validations ` uses to invoke the validation .
# Allow blank values to pass through. # Disallow unparseable addresses. # Make sure the domain in the address is reasonable.
value