Skip to content

Commit

Permalink
Update the dataset (NA/RO address formats, AU/IN/KR subdivisions)
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanz committed May 31, 2019
1 parent 43e974b commit b2aebff
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 1 deletion.
4 changes: 4 additions & 0 deletions resources/subdivision/AU.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
"iso_code": "AU-ACT",
"postal_code_pattern": "29|2540|260|261[0-8]|02|2620"
},
"JBT": {
"name": "Jervis Bay Territory",
"postal_code_pattern": "2540"
},
"NSW": {
"name": "New South Wales",
"iso_code": "AU-NSW",
Expand Down
2 changes: 1 addition & 1 deletion resources/subdivision/IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"Daman and Diu": {
"name": "Daman & Diu",
"iso_code": "IN-DD",
"postal_code_pattern": "396"
"postal_code_pattern": "396|362"
},
"Delhi": {
"iso_code": "IN-DL",
Expand Down
15 changes: 15 additions & 0 deletions resources/subdivision/KR-69e0dd7af79b96dc5528e3d2f873fe2b.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,30 @@
],
"locale": "ko",
"subdivisions": {
"Goun-dong": {
"local_code": "고운동"
},
"Geumnam-myeon": {
"local_code": "금남면"
},
"Daepyeong-dong": {
"local_code": "대평동"
},
"Dodam-dong": {
"local_code": "도담동"
},
"Boram-dong": {
"local_code": "보람동"
},
"Bugang-myeon": {
"local_code": "부강면"
},
"Saerom-dong": {
"local_code": "새롬동"
},
"Sodam-dong": {
"local_code": "소담동"
},
"Sojeong-myeon": {
"local_code": "소정면"
},
Expand Down
7 changes: 7 additions & 0 deletions src/AddressFormat/AddressFormatRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,10 @@ protected function getDefinitions()
'postal_code_pattern' => '\d{4}',
'subdivision_depth' => 1,
],
'NA' => [
'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%localityn%postalCode",
'postal_code_pattern' => '\d{5}',
],
'NC' => [
'format' => "%organization\n%givenName %familyName\n%addressLine1\n%addressLine2\n%postalCode %locality %sortingCode",
'required_fields' => [
Expand Down Expand Up @@ -1195,6 +1199,9 @@ protected function getDefinitions()
],
'RO' => [
'format' => "%givenName %familyName\n%organization\n%addressLine1\n%addressLine2\n%postalCode %locality",
'required_fields' => [
'addressLine1', 'locality', 'postalCode',
],
'uppercase_fields' => [
'addressLine1', 'addressLine2', 'locality',
],
Expand Down

0 comments on commit b2aebff

Please sign in to comment.