Skip to content

Commit

Permalink
Remove the administrative area field from AS, MP, VI.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bojanz committed May 17, 2023
1 parent 4cbd92d commit 0cf0314
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/AddressFormat/AddressFormatRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -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}))?',
],
Expand Down Expand Up @@ -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}))?',
],
Expand Down Expand Up @@ -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}))?',
],
Expand Down

0 comments on commit 0cf0314

Please sign in to comment.