Class: SedolValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- SedolValidator
- Defined in:
- lib/active_validation/validators/sedol_validator.rb
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/active_validation/validators/sedol_validator.rb', line 7 def validate_each(record, attribute, value) return if valid?(value.to_s) record.errors[attribute] << ([:message] || I18n.t('active_validation.errors.messages.sedol')) end |