From 0cf03147e9ffe6d10c92e00818d005f539f52f29 Mon Sep 17 00:00:00 2001 From: Bojan Zivanovic Date: Thu, 18 May 2023 00:22:23 +0200 Subject: [PATCH] Remove the administrative area field from AS, MP, VI. These are all islands which originally inherited the US address format, and with it the administrative area field, even though they don't have administrative areas defined by ISO. Basically, they are US subdivisions with their own country codes. --- src/AddressFormat/AddressFormatRepository.php | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/AddressFormat/AddressFormatRepository.php b/src/AddressFormat/AddressFormatRepository.php index 0ea573d0..db0ef182 100644 --- a/src/AddressFormat/AddressFormatRepository.php +++ b/src/AddressFormat/AddressFormatRepository.php @@ -140,14 +140,13 @@ protected function getDefinitions(): array 'subdivision_depth' => 1, ], 'AS' => [ - 'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality %administrativeArea %postalCode", + 'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality %postalCode", 'required_fields' => [ - 'addressLine1', 'locality', 'administrativeArea', 'postalCode', + 'addressLine1', 'locality', 'postalCode', ], 'uppercase_fields' => [ - 'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea', + 'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', ], - 'administrative_area_type' => 'state', 'postal_code_type' => 'zip', 'postal_code_pattern' => '(96799)(?:[ \-](\d{4}))?', ], @@ -929,14 +928,13 @@ protected function getDefinitions(): array ], ], 'MP' => [ - 'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality %administrativeArea %postalCode", + 'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality %postalCode", 'required_fields' => [ - 'addressLine1', 'locality', 'administrativeArea', 'postalCode', + 'addressLine1', 'locality', 'postalCode', ], 'uppercase_fields' => [ - 'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea', + 'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', ], - 'administrative_area_type' => 'state', 'postal_code_type' => 'zip', 'postal_code_pattern' => '(9695[012])(?:[ \-](\d{4}))?', ], @@ -1496,14 +1494,13 @@ protected function getDefinitions(): array 'postal_code_pattern' => 'VG\d{4}', ], 'VI' => [ - 'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality %administrativeArea %postalCode", + 'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%addressLine3\n%locality %postalCode", 'required_fields' => [ - 'addressLine1', 'locality', 'administrativeArea', 'postalCode', + 'addressLine1', 'locality', 'postalCode', ], 'uppercase_fields' => [ - 'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', 'administrativeArea', + 'addressLine1', 'addressLine2', 'locality', 'familyName', 'additionalName', 'givenName', 'organization', ], - 'administrative_area_type' => 'state', 'postal_code_type' => 'zip', 'postal_code_pattern' => '(008(?:(?:[0-4]\d)|(?:5[01])))(?:[ \-](\d{4}))?', ],