Module: DataMapper::Validations::ValidatesAbsence
- Extended by:
- Deprecate
- Included in:
- ClassMethods
- Defined in:
- lib/dm-validations/validators/absent_field_validator.rb
Overview
class AbsenceValidator
Instance Method Summary collapse
-
#validates_absence_of(*fields) ⇒ Object
Validates that the specified attribute is “blank” via the attribute’s #blank? method.
Instance Method Details
#validates_absence_of(*fields) ⇒ Object
Note:
dm-core’s support lib adds the #blank? method to many classes,
Validates that the specified attribute is “blank” via the attribute’s #blank? method.
51 52 53 |
# File 'lib/dm-validations/validators/absent_field_validator.rb', line 51 def validates_absence_of(*fields) validators.add(AbsenceValidator, *fields) end |