Module: DataMapper::Validations::ValidatesLength
- Extended by:
- Deprecate
- Included in:
- ClassMethods
- Defined in:
- lib/dm-validations/validators/length_validator.rb
Overview
class LengthValidator
Instance Method Summary collapse
-
#validates_length_of(*fields) ⇒ Object
Validates that the length of the attribute is equal to, less than, greater than or within a certain range (depending upon the options you specify).
Instance Method Details
#validates_length_of(*fields) ⇒ Object
Validates that the length of the attribute is equal to, less than, greater than or within a certain range (depending upon the options you specify).
199 200 201 202 |
# File 'lib/dm-validations/validators/length_validator.rb', line 199 def validates_length_of(*fields) opts = opts_from_validator_args(fields) add_validator_to_context(opts, fields, DataMapper::Validations::LengthValidator) end |