class Elastictastic::Validations::NestedValidator
Public Instance Methods
validate_each(record, attribute, value)
click to toggle source
# File lib/elastictastic/validations.rb, line 35 def validate_each(record, attribute, value) value = [value].compact unless Array === value unless value.all? { |el| el.valid? } record.errors[:attribute] = :invalid end end