Module: DataMapper::Validate::ValidatesLength
- Included in:
- ClassMethods
- Defined in:
- lib/gems/dm-validations-0.9.9/lib/dm-validations/length_validator.rb
Overview
class LengthValidator
Instance Method Summary collapse
-
#validates_length(*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(*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).
106 107 108 109 |
# File 'lib/gems/dm-validations-0.9.9/lib/dm-validations/length_validator.rb', line 106 def validates_length(*fields) opts = opts_from_validator_args(fields) add_validator_to_context(opts, fields, DataMapper::Validate::LengthValidator) end |