Class: Validatable::ValidatesLengthOf
- Inherits:
-
ValidationBase
- Object
- ValidationBase
- Validatable::ValidatesLengthOf
- Defined in:
- lib/devise/orm/mongo_mapper/mm-validations.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#message(instance) ⇒ Object
50 51 52 53 54 |
# File 'lib/devise/orm/mongo_mapper/mm-validations.rb', line 50 def (instance) min = !within.nil? ? within.first : minimum max = !within.nil? ? within.last : maximum super || "must be between #{min} and #{max} characters long" end |