Class: Spina::Admin::Conferences::EmailAddressValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- Spina::Admin::Conferences::EmailAddressValidator
- Defined in:
- app/validators/spina/admin/conferences/email_address_validator.rb
Overview
Validator for email addresses.
Instance Method Summary collapse
-
#validate_each(record, attribute, value) ⇒ Object
Performs validation on the supplied record.
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
Performs validation on the supplied record.
12 13 14 15 16 |
# File 'app/validators/spina/admin/conferences/email_address_validator.rb', line 12 def validate_each(record, attribute, value) return if value.blank? record.errors.add(attribute, :invalid_email_address) unless parse(value) end |