Class: FileSizeValidator
- Inherits:
-
BaseValidator
- Object
- ActiveModel::EachValidator
- BaseValidator
- FileSizeValidator
- Defined in:
- lib/lite/validators/file_size_validator.rb
Direct Known Subclasses
Constant Summary collapse
- CHECKS =
{ in: :===, less_than: :<, less_than_or_equal_to: :<=, greater_than: :>, greater_than_or_equal_to: :>=, equal_to: :==, not_equal_to: :!= }.freeze
Instance Method Summary collapse
Instance Method Details
#validate_each(record, attribute, value) ⇒ Object
15 16 17 18 19 |
# File 'lib/lite/validators/file_size_validator.rb', line 15 def validate_each(record, attribute, value) assert_valid_checks! assign_attr_readers(record, attribute, value) valid? end |