class ValidValidator

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File lib/mv/core/validators/valid_validator.rb, line 2
def validate_each(record, attribute, value)
  if value.invalid?
    value.errors.full_messages.each do |message|
      record.errors.add(:validation, message)
    end
  end
end