Class: AtlasEngine::AddressImporter::Validation::FieldValidations::City

Inherits:
Object
  • Object
show all
Extended by:
T::Helpers, T::Sig
Includes:
Interface
Defined in:
app/models/atlas_engine/address_importer/validation/field_validations/city.rb

Instance Method Summary collapse

Constructor Details

#initialize(address:, allow_partial_zip: false) ⇒ City

Returns a new instance of City.



19
20
21
22
# File 'app/models/atlas_engine/address_importer/validation/field_validations/city.rb', line 19

def initialize(address:, allow_partial_zip: false)
  @city = address.city
  @errors = []
end

Instance Method Details

#validation_errorsObject



25
26
27
28
29
# File 'app/models/atlas_engine/address_importer/validation/field_validations/city.rb', line 25

def validation_errors
  clear_errors
  validate
  errors
end