Class: DefraRuby::Validators::EmailValidator
- Inherits:
-
BaseValidator
- Object
- ActiveModel::EachValidator
- BaseValidator
- DefraRuby::Validators::EmailValidator
- Includes:
- CanValidatePresence
- Defined in:
- lib/defra_ruby/validators/email_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
10 11 12 13 14 |
# File 'lib/defra_ruby/validators/email_validator.rb', line 10 def validate_each(record, attribute, value) return false unless value_is_present?(record, attribute, value) valid_format?(record, attribute, value) end |