class PersonWithValidator::PresenceValidator

Public Instance Methods

validate_each(record, attribute, value) click to toggle source
# File activemodel/test/models/person_with_validator.rb, line 7
def validate_each(record, attribute, value)
  record.errors[attribute] << "Local validator#{options[:custom]}" if value.blank?
end