Module: DataMapper::Validate::ValidatesWithin

Included in:
ClassMethods
Defined in:
lib/dm-validations/within_validator.rb

Overview

class WithinValidator

Instance Method Summary collapse

Instance Method Details

#validates_within(*fields) ⇒ Object

Validate the absence of a field


46
47
48
49
# File 'lib/dm-validations/within_validator.rb', line 46

def validates_within(*fields)
  opts = opts_from_validator_args(fields)
  add_validator_to_context(opts, fields, DataMapper::Validate::WithinValidator)
end