Module: CouchRest::Validation::ValidatesLength
- Included in:
- ClassMethods
- Defined in:
- lib/couchrest/validation/validators/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).
127 128 129 130 |
# File 'lib/couchrest/validation/validators/length_validator.rb', line 127 def validates_length(*fields) opts = opts_from_validator_args(fields) add_validator_to_context(opts, fields, CouchRest::Validation::LengthValidator) end |