Ruby on Rails - validating length in ruby on rails- ruby on rails tutorial - rails guides - rails tutorial - ruby rails
The possible length constraint options are:
- :minimum - The attribute cannot have less than the specified length.
- :maximum - The attribute cannot have more than the specified length.
- :in (or :within) - The attribute length must be included in a given interval. The value for this option must be a range.
- :is - The attribute length must be equal to the given value.