Class: Mongoid::Validatable::CollectionSizeValidator
- Inherits:
-
LengthValidator
- Object
- LengthValidator
- Mongoid::Validatable::CollectionSizeValidator
- Defined in:
- lib/custom_fields/extensions/mongoid/validatable/collection_size.rb
Overview
Validates that the specified collections do or do not match a certain size.
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
17 18 19 20 21 |
# File 'lib/custom_fields/extensions/mongoid/validatable/collection_size.rb', line 17 def validate_each(record, attribute, value) value = collection_to_size(record, attribute) super(record, attribute, value) end |