Class: Dragonfly::ActiveModelExtensions::Validations::PropertyValidator
- Inherits:
-
ActiveModel::EachValidator
- Object
- ActiveModel::EachValidator
- Dragonfly::ActiveModelExtensions::Validations::PropertyValidator
- Defined in:
- lib/dragonfly/active_model_extensions/validations.rb
Instance Method Summary (collapse)
Instance Method Details
- (Object) validate_each(model, attribute, attachment)
7 8 9 10 11 12 |
# File 'lib/dragonfly/active_model_extensions/validations.rb', line 7 def validate_each(model, attribute, ) if property = .send(property_name) model.errors.add(attribute, (property, model)) unless matches?(property) end end |