class ValueObjects::ValidValidator
Public Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/value_objects/valid_validator.rb, line 6 def validate_each(record, attribute, value) record.errors.add(attribute, :invalid) unless value && Array(value).count(&:invalid?) == 0 end