Class: ActiveStorageValidations::PagesValidator
- Inherits:
-
BaseComparisonValidator
- Object
- ActiveModel::EachValidator
- BaseComparisonValidator
- ActiveStorageValidations::PagesValidator
- Includes:
- ASVAnalyzable, ASVAttachable
- Defined in:
- lib/active_storage_validations/pages_validator.rb
Constant Summary collapse
- ERROR_TYPES =
i[ pages_not_less_than pages_not_less_than_or_equal_to pages_not_greater_than pages_not_greater_than_or_equal_to pages_not_between pages_not_equal_to ].freeze
- METADATA_KEYS =
i[pages].freeze
Constants included from ASVAnalyzable
ASVAnalyzable::DEFAULT_IMAGE_PROCESSOR
Constants inherited from BaseComparisonValidator
BaseComparisonValidator::AVAILABLE_CHECKS
Instance Method Summary collapse
Methods inherited from BaseComparisonValidator
Methods included from ASVErrorable
#add_error, #initialize_error_options
Constructor Details
This class inherits a constructor from ActiveStorageValidations::BaseComparisonValidator
Instance Method Details
#validate_each(record, attribute, _value) ⇒ Object
24 25 26 27 28 |
# File 'lib/active_storage_validations/pages_validator.rb', line 24 def validate_each(record, attribute, _value) return if (record, attribute) (record, attribute, METADATA_KEYS) end |