Class: MetadataPresenter::MaxLengthValidator
- Inherits:
-
BaseValidator
- Object
- BaseValidator
- MetadataPresenter::MaxLengthValidator
- Defined in:
- app/validators/metadata_presenter/max_length_validator.rb
Instance Attribute Summary
Attributes inherited from BaseValidator
Instance Method Summary collapse
Methods inherited from BaseValidator
#allow_blank?, #custom_error_message, #default_error_message, #error_key, #error_message_hash, #initialize, #schema_key, #user_answer, #valid?, #validation_value
Constructor Details
This class inherits a constructor from MetadataPresenter::BaseValidator
Instance Method Details
#invalid_answer? ⇒ Boolean
3 4 5 |
# File 'app/validators/metadata_presenter/max_length_validator.rb', line 3 def invalid_answer? user_answer.to_s.size > component.validation[schema_key].to_i end |