Class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
- Inherits:
-
Predicate
- Object
- Predicate
- AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
- Defined in:
- app/models/atlas_engine/address_validation/validators/predicates/not_exceed_max_length.rb
Constant Summary collapse
- MAX_COMPONENT_LENGTH =
T.let( { street_name: 200, street_number: 50, line2: 175, neighborhood: 75, default: 255, }, T::Hash[Symbol, Integer], )
Instance Attribute Summary
Attributes inherited from Predicate
#address, #cache, #field, #message_format
Instance Method Summary collapse
Methods inherited from Predicate
Constructor Details
This class inherits a constructor from AtlasEngine::AddressValidation::Validators::Predicates::Predicate
Instance Method Details
#evaluate ⇒ Object
21 22 23 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/not_exceed_max_length.rb', line 21 def evaluate build_concern if address.send(@field).to_s.length > limit end |