Class: ModestModel::Validators::AbsenceValidator

Inherits:
ActiveModel::EachValidator
  • Object
show all
Defined in:
lib/modest_model/validators.rb

Instance Method Summary collapse

Instance Method Details

#validate_each(record, attribute, value) ⇒ Object



4
5
6
# File 'lib/modest_model/validators.rb', line 4

def validate_each(record, attribute, value)
  record.errors.add(attribute, :invalid, options) unless value.blank?
end