Skip to content

Commit

Permalink
Rebuld the address format for Kazakhstan, add regions.
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanz committed Nov 28, 2023
1 parent 1e9ad95 commit 3e17774
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions formats.go
Original file line number Diff line number Diff line change
Expand Up @@ -894,9 +894,29 @@ var formats = map[string]Format{
PostalCodePattern: `KY\d-\d{4}`,
},
"KZ": {
Layout: "%P\n%R\n%L\n%1\n%2\n%3",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{6}`,
Locale: Locale{Language: "kk"},
Layout: "%1\n%2\n%3\n%P, %L\n%R",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
RegionType: RegionTypeRegion,
PostalCodePattern: `\d{6}|[A-Z0-9]{7}`,
Regions: NewRegionMap(
"10", "Abai Region", "11", "Akmola Region", "15", "Aktobe Region",
"75", "Almaty", "19", "Almaty Region", "71", "Astana",
"23", "Atyrau Region", "63", "East Kazakhstan Region", "31", "Jambyl Region",
"33", "Jetisu Region", "35", "Karaganda Region", "39", "Kostanay Region",
"43", "Kyzylorda Region", "47", "Mangystau Region", "59", "North Kazakhstan Region",
"55", "Pavlodar Region", "79", "Shymkent", "61", "Turkistan Region",
"62", "Ulytau Region", "27", "West Kazakhstan Region",
),
LocalRegions: NewRegionMap(
"10", "Abay oblysy", "75", "Almaty", "19", "Almaty oblysy",
"11", "Aqmola oblysy", "15", "Aqtöbe oblysy", "71", "Astana",
"23", "Atyraū oblysy", "27", "Batys Qazaqstan oblysy", "47", "Mangghystaū oblysy",
"55", "Pavlodar oblysy", "35", "Qaraghandy oblysy", "39", "Qostanay oblysy",
"43", "Qyzylorda oblysy", "63", "Shyghys Qazaqstan oblysy", "79", "Shymkent",
"59", "Soltüstik Qazaqstan oblysy", "61", "Türkistan oblysy", "62", "Ulytaū oblysy",
"31", "Zhambyl oblysy", "33", "Zhetisū oblysy",
),
},
"LA": {
Layout: "%1\n%2\n%3\n%P %L",
Expand Down

0 comments on commit 3e17774

Please sign in to comment.