Module: DataMapper::Validate::ValidatesWithin
- Included in:
- ClassMethods
- Defined in:
- lib/dm-validations/within_validator.rb
Overview
class WithinValidator
Instance Method Summary collapse
-
#validates_within(*fields) ⇒ Object
Validate the absence of a field.
Instance Method Details
#validates_within(*fields) ⇒ Object
Validate the absence of a field
34 35 36 37 |
# File 'lib/dm-validations/within_validator.rb', line 34 def validates_within(*fields) opts = opts_from_validator_args(fields) add_validator_to_context(opts, fields, DataMapper::Validate::WithinValidator) end |