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