-
Notifications
You must be signed in to change notification settings - Fork 3
/
formats.go
1904 lines (1902 loc) · 81.6 KB
/
formats.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Copyright (c) 2020 Bojan Zivanovic and contributors
// SPDX-License-Identifier: MIT
package address
var formats = map[string]Format{
"ZZ": {
Layout: "%1\n%2\n%3\n%L",
Required: []Field{FieldLine1, FieldLocality},
},
"AC": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: "ASCN 1ZZ",
},
"AD": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `AD[1-7]0\d`,
},
"AE": {
Locale: Locale{Language: "ar"},
Layout: "%1\n%2\n%3\n%R",
Required: []Field{FieldLine1, FieldRegion},
RegionType: RegionTypeEmirate,
Regions: NewRegionMap(
"AZ", "Abu Dhabi", "AJ", "Ajmān", "DU", "Dubai",
"FU", "Fujairah", "RK", "Ras Al Khaimah", "SH", "Sharjah",
"UQ", "Umm Al Quwain",
),
LocalRegions: NewRegionMap(
"AZ", "أبو ظبي", "SH", "الشارقة", "FU", "الفجيرة",
"UQ", "ام القيوين", "DU", "دبي", "RK", "رأس الخيمة",
"AJ", "عجمان",
),
},
"AF": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"AG": {
Layout: "%1\n%2\n%3\n%L",
Required: []Field{FieldLine1},
},
"AI": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `(?:AI-)?2640`,
},
"AL": {
Layout: "%1\n%2\n%3\n%P\n%L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"AM": {
Locale: Locale{Language: "hy"},
Layout: "%1\n%2\n%3\n%P\n%L\n%R",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `(?:37)?\d{4}`,
Regions: NewRegionMap(
"AG", "Aragatsotn", "AR", "Ararat", "AV", "Armavir",
"GR", "Gegharkunik", "KT", "Kotayk", "LO", "Lori",
"SH", "Shirak", "SU", "Syunik", "TV", "Tavush",
"VD", "Vayots Dzor", "ER", "Yerevan",
),
LocalRegions: NewRegionMap(
"AG", "Արագածոտն", "AR", "Արարատ", "AV", "Արմավիր",
"GR", "Գեղարքունիք", "ER", "Երևան", "LO", "Լոռի",
"KT", "Կոտայք", "SH", "Շիրակ", "SU", "Սյունիք",
"VD", "Վայոց ձոր", "TV", "Տավուշ",
),
},
"AR": {
Layout: "%1\n%2\n%3\n%P %L\n%R",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `((?:[A-HJ-NP-Z])?\d{4})([A-Z]{3})?`,
Regions: NewRegionMap(
"B", "Buenos Aires", "K", "Catamarca", "H", "Chaco",
"U", "Chubut", "C", "Ciudad Autónoma de Buenos Aires", "X", "Córdoba",
"W", "Corrientes", "E", "Entre Ríos", "P", "Formosa",
"Y", "Jujuy", "L", "La Pampa", "F", "La Rioja",
"M", "Mendoza", "N", "Misiones", "Q", "Neuquén",
"R", "Río Negro", "A", "Salta", "J", "San Juan",
"D", "San Luis", "Z", "Santa Cruz", "S", "Santa Fe",
"G", "Santiago del Estero", "V", "Tierra del Fuego", "T", "Tucumán",
),
},
"AS": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodeType: PostalCodeTypeZip,
PostalCodePattern: `(96799)(?:[ \-](\d{4}))?`,
},
"AT": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{4}`,
},
"AU": {
Layout: "%1\n%2\n%3\n%L %R %P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion, FieldPostalCode},
RegionType: RegionTypeState,
LocalityType: LocalityTypeSuburb,
PostalCodePattern: `\d{4}`,
ShowRegionID: true,
Regions: NewRegionMap(
"ACT", "Australian Capital Territory", "NSW", "New South Wales", "NT", "Northern Territory",
"QLD", "Queensland", "SA", "South Australia", "TAS", "Tasmania",
"VIC", "Victoria", "WA", "Western Australia",
),
},
"AX": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `22\d{3}`,
},
"AZ": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"BA": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"BB": {
Layout: "%1\n%2\n%3\n%L, %R %P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
RegionType: RegionTypeParish,
PostalCodePattern: `BB\d{5}`,
Regions: NewRegionMap(
"01", "Christ Church", "02", "Saint Andrew", "03", "Saint George",
"04", "Saint James", "05", "Saint John", "06", "Saint Joseph",
"07", "Saint Lucy", "08", "Saint Michael", "09", "Saint Peter",
"10", "Saint Philip", "11", "Saint Thomas",
),
},
"BD": {
Layout: "%1\n%2\n%3\n%L - %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"BE": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{4}`,
},
"BG": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"BH": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `(?:^|\b)(?:1[0-2]|[1-9])\d{2}(?:$|\b)`,
},
"BL": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `9[78][01]\d{2}`,
},
"BM": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `[A-Z]{2} ?[A-Z0-9]{2}`,
},
"BN": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `[A-Z]{2} ?\d{4}`,
},
"BR": {
Layout: "%1\n%2\n%3\n%S\n%L-%R\n%P",
Required: []Field{FieldLine1, FieldRegion, FieldLocality, FieldPostalCode},
RegionType: RegionTypeState,
SublocalityType: SublocalityTypeNeighborhood,
PostalCodePattern: `\d{5}-?\d{3}`,
ShowRegionID: true,
Regions: NewRegionMap(
"AC", "Acre", "AL", "Alagoas", "AP", "Amapá",
"AM", "Amazonas", "BA", "Bahia", "CE", "Ceará",
"DF", "Distrito Federal", "ES", "Espírito Santo", "GO", "Goiás",
"MA", "Maranhão", "MT", "Mato Grosso", "MS", "Mato Grosso do Sul",
"MG", "Minas Gerais", "PA", "Pará", "PB", "Paraíba",
"PR", "Paraná", "PE", "Pernambuco", "PI", "Piauí",
"RJ", "Rio de Janeiro", "RN", "Rio Grande do Norte", "RS", "Rio Grande do Sul",
"RO", "Rondônia", "RR", "Roraima", "SC", "Santa Catarina",
"SP", "São Paulo", "SE", "Sergipe", "TO", "Tocantins",
),
},
"BS": {
Layout: "%1\n%2\n%3\n%L, %R",
Required: []Field{FieldLine1, FieldLocality},
RegionType: RegionTypeIsland,
Regions: NewRegionMap(
"AK", "Acklins", "BY", "Berry Islands", "BI", "Bimini",
"BP", "Black Point", "CI", "Cat Island", "CO", "Central Abaco",
"CS", "Central Andros", "CE", "Central Eleuthera", "FP", "City of Freeport",
"CK", "Crooked Island and Long Cay", "EG", "East Grand Bahama", "EX", "Exuma",
"GC", "Grand Cay", "HI", "Harbour Island", "HT", "Hope Town",
"IN", "Inagua", "LI", "Long Island", "MC", "Mangrove Cay",
"MG", "Mayaguana", "MI", "Moore's Island", "NP", "New Providence",
"NO", "North Abaco", "NS", "North Andros", "NE", "North Eleuthera",
"RI", "Ragged Island", "RC", "Rum Cay", "SS", "San Salvador",
"SO", "South Abaco", "SA", "South Andros", "SE", "South Eleuthera",
"SW", "Spanish Wells", "WG", "West Grand Bahama",
),
},
"BT": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"BY": {
Layout: "%1\n%2\n%3\n%P, %L\n%R",
Required: []Field{FieldLine1, FieldLocality},
RegionType: RegionTypeRegion,
PostalCodePattern: `\d{6}`,
},
"CA": {
Locale: Locale{Language: "fr"},
Layout: "%1\n%2\n%3\n%L %R %P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion, FieldPostalCode},
PostalCodePattern: `[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z] ?\d[ABCEGHJ-NPRSTV-Z]\d`,
ShowRegionID: true,
Regions: NewRegionMap(
"AB", "Alberta", "BC", "British Columbia", "MB", "Manitoba",
"NB", "New Brunswick", "NL", "Newfoundland and Labrador", "NT", "Northwest Territories",
"NS", "Nova Scotia", "NU", "Nunavut", "ON", "Ontario",
"PE", "Prince Edward Island", "QC", "Quebec", "SK", "Saskatchewan",
"YT", "Yukon",
),
LocalRegions: NewRegionMap(
"AB", "Alberta", "BC", "Colombie-Britannique", "MB", "Manitoba",
"NB", "Nouveau-Brunswick", "NL", "Terre-Neuve-et-Labrador", "NT", "Territoires du Nord-Ouest",
"NS", "Nouvelle-Écosse", "NU", "Nunavut", "ON", "Ontario",
"PE", "Île-du-Prince-Édouard", "QC", "Québec", "SK", "Saskatchewan",
"YT", "Yukon",
),
},
"CC": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: "6799",
},
"CH": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{4}`,
},
"CL": {
Layout: "%1\n%2\n%3\n%P %L\n%R",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
RegionType: RegionTypeRegion,
PostalCodePattern: `\d{7}`,
Regions: NewRegionMap(
"AI", "Aisén del General Carlos Ibáñez del Campo", "AN", "Antofagasta", "AR", "Araucanía",
"AP", "Arica y Parinacota", "AT", "Atacama", "BI", "Biobío",
"CO", "Coquimbo", "LI", "Libertador General Bernardo O'Higgins", "LL", "Los Lagos",
"LR", "Los Ríos", "MA", "Magallanes y de la Antártica Chilena", "ML", "Maule",
"RM", "Metropolitana de Santiago", "NB", "Ñuble", "TA", "Tarapacá",
"VS", "Valparaíso",
),
},
"CN": {
Locale: Locale{Language: "zh"},
Layout: "%1\n%2\n%3\n%S\n%L\n%R, %P",
LocalLayout: "%P\n%R%L%S\n%1\n%2\n%3",
Required: []Field{FieldLine1, FieldLocality, FieldRegion, FieldPostalCode},
SublocalityType: SublocalityTypeDistrict,
PostalCodePattern: `\d{6}`,
Regions: NewRegionMap(
"AH", "Anhui Sheng", "BJ", "Beijing Shi", "CQ", "Chongqing Shi",
"FJ", "Fujian Sheng", "GS", "Gansu Sheng", "GD", "Guangdong Sheng",
"GX", "Guangxi Zhuangzu Zizhiqu", "GZ", "Guizhou Sheng", "HI", "Hainan Sheng",
"HE", "Hebei Sheng", "HL", "Heilongjiang Sheng", "HA", "Henan Sheng",
"HK", "Hong Kong SAR", "HB", "Hubei Sheng", "HN", "Hunan Sheng",
"JS", "Jiangsu Sheng", "JX", "Jiangxi Sheng", "JL", "Jilin Sheng",
"LN", "Liaoning Sheng", "MO", "Macao SAR", "NM", "Neimenggu Zizhiqu",
"NX", "Ningxia Huizu Zizhiqu", "QH", "Qinghai Sheng", "SN", "Shaanxi Sheng",
"SD", "Shandong Sheng", "SH", "Shanghai Shi", "SX", "Shanxi Sheng",
"SC", "Sichuan Sheng", "TW", "Taiwan Sheng", "TJ", "Tianjin Shi",
"XJ", "Xinjiang Weiwu'er Zizhiqu", "XZ", "Xizang Zizhiqu", "YN", "Yunnan Sheng",
"ZJ", "Zhejiang Sheng",
),
LocalRegions: NewRegionMap(
"AH", "安徽省", "MO", "澳门", "BJ", "北京市",
"CQ", "重庆市", "FJ", "福建省", "GS", "甘肃省",
"GD", "广东省", "GX", "广西", "GZ", "贵州省",
"HI", "海南省", "HE", "河北省", "HA", "河南省",
"HL", "黑龙江省", "HB", "湖北省", "HN", "湖南省",
"JL", "吉林省", "JS", "江苏省", "JX", "江西省",
"LN", "辽宁省", "NM", "内蒙古", "NX", "宁夏",
"QH", "青海省", "SD", "山东省", "SX", "山西省",
"SN", "陕西省", "SH", "上海市", "SC", "四川省",
"TW", "台湾", "TJ", "天津市", "XZ", "西藏",
"HK", "香港", "XJ", "新疆", "YN", "云南省",
"ZJ", "浙江省",
),
},
"CO": {
Layout: "%1\n%2\n%3\n%L, %R, %P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
RegionType: RegionTypeDepartment,
PostalCodePattern: `\d{6}`,
ShowRegionID: true,
Regions: NewRegionMap(
"AMA", "Amazonas", "ANT", "Antioquia", "ARA", "Arauca",
"ATL", "Atlántico", "BOL", "Bolívar", "BOY", "Boyacá",
"CAL", "Caldas", "CAQ", "Caquetá", "CAS", "Casanare",
"CAU", "Cauca", "CES", "Cesar", "COR", "Córdoba",
"CUN", "Cundinamarca", "CHO", "Chocó", "DC", "Distrito Capital de Bogotá",
"GUA", "Guanía", "GUV", "Guaviare", "HUI", "Huila",
"LAG", "La Guajira", "MAG", "Magdalena", "MET", "Meta",
"NAR", "Nariño", "NSA", "Norte de Santander", "PUT", "Putumayo",
"QUI", "Quindío", "RIS", "Risaralda", "SAP", "San Andrés, Providencia y Santa Catalina",
"SAN", "Santander", "SUC", "Sucre", "TOL", "Tolima",
"VAC", "Valle del Cauca", "VAU", "Vaupés", "VID", "Vichada",
),
},
"CR": {
Layout: "%1\n%2\n%3\n%R, %L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
PostalCodePattern: `\d{4,5}|\d{3}-\d{4}`,
Regions: NewRegionMap(
"A", "Alajuela", "C", "Cartago", "G", "Guanacaste",
"H", "Heredia", "L", "Limón", "P", "Puntarenas",
"SJ", "San José",
),
},
"CU": {
Layout: "%1\n%2\n%3\n%L %R\n%P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
Regions: NewRegionMap(
"15", "Artemisa", "09", "Camagüey", "08", "Ciego de Ávila",
"06", "Cienfuegos", "12", "Granma", "14", "Guantánamo",
"11", "Holguín", "99", "Isla de la Juventud", "03", "La Habana",
"10", "Las Tunas", "04", "Matanzas", "16", "Mayabeque",
"01", "Pinar del Río", "07", "Sancti Spíritus", "13", "Santiago de Cuba",
"05", "Villa Clara",
),
},
"CV": {
Layout: "%1\n%2\n%3\n%P %L\n%R",
Required: []Field{FieldLine1, FieldLocality},
RegionType: RegionTypeIsland,
PostalCodePattern: `\d{4}`,
},
"CX": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: "6798",
},
"CY": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"CZ": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{3} ?\d{2}`,
},
"DE": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{5}`,
},
"DK": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{4}`,
},
"DO": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"DZ": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"EC": {
Layout: "%1\n%2\n%3\n%P\n%L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{6}`,
},
"EE": {
Layout: "%1\n%2\n%3\n%P %L %R",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
RegionType: RegionTypeCounty,
PostalCodePattern: `\d{5}`,
Regions: NewRegionMap(
"37", "Harjumaa", "39", "Hiiumaa", "45", "Ida-Virumaa",
"50", "Jõgevamaa", "52", "Järvamaa", "56", "Läänemaa",
"60", "Lääne-Virumaa", "64", "Põlvamaa", "68", "Pärnumaa",
"71", "Raplamaa", "74", "Saaremaa", "79", "Tartumaa",
"81", "Valgamaa", "84", "Viljandimaa", "87", "Võrumaa",
),
},
"EG": {
Locale: Locale{Language: "ar"},
Layout: "%1\n%2\n%3\n%L\n%R\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
PostalCodePattern: `\d{5}`,
Regions: NewRegionMap(
"ALX", "Alexandria", "ASN", "Aswan", "AST", "Asyut",
"BH", "Beheira", "BNS", "Beni Suef", "C", "Cairo",
"DK", "Dakahlia", "DT", "Damietta", "FYM", "Faiyum",
"GH", "Gharbia", "GZ", "Giza", "IS", "Ismailia",
"KFS", "Kafr el-Sheikh", "LX", "Luxor", "MT", "Matruh",
"MN", "Minya", "MNF", "Monufia", "WAD", "New Valley",
"SIN", "North Sinai", "PTS", "Port Said", "KB", "Qalyubia",
"KN", "Qena", "BA", "Red Sea", "SHR", "Sharqia",
"SHG", "Sohag", "JS", "South Sinai", "SUZ", "Suez",
),
LocalRegions: NewRegionMap(
"ASN", "أسوان", "AST", "أسيوط", "ALX", "الإسكندرية",
"IS", "الإسماعيلية", "LX", "الأقصر", "BA", "البحر الأحمر",
"BH", "البحيرة", "GZ", "الجيزة", "DK", "الدقهلية",
"SUZ", "السويس", "SHR", "الشرقية", "GH", "الغربية",
"FYM", "الفيوم", "C", "القاهرة", "KB", "القليوبية",
"MNF", "المنوفية", "MN", "المنيا", "WAD", "الوادي الجديد",
"BNS", "بني سويف", "PTS", "بورسعيد", "JS", "جنوب سيناء",
"DT", "دمياط", "SHG", "سوهاج", "SIN", "شمال سيناء",
"KN", "قنا", "KFS", "كفر الشيخ", "MT", "مطروح",
),
},
"EH": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"ES": {
Layout: "%1\n%2\n%3\n%P %L %R",
Required: []Field{FieldLine1, FieldLocality, FieldRegion, FieldPostalCode},
PostalCodePattern: `\d{5}`,
Regions: NewRegionMap(
"C", "A Coruña", "VI", "Alava", "AB", "Albacete",
"A", "Alicante", "AL", "Almería", "O", "Asturias",
"AV", "Ávila", "BA", "Badajoz", "PM", "Baleares",
"B", "Barcelona", "BU", "Burgos", "CC", "Cáceres",
"CA", "Cádiz", "S", "Cantabria", "CS", "Castellón",
"CE", "Ceuta", "CR", "Ciudad Real", "CO", "Córdoba",
"CU", "Cuenca", "GI", "Girona", "GR", "Granada",
"GU", "Guadalajara", "SS", "Guipúzcoa", "H", "Huelva",
"HU", "Huesca", "J", "Jaén", "LO", "La Rioja",
"GC", "Las Palmas", "LE", "León", "L", "Lleida",
"LU", "Lugo", "M", "Madrid", "MA", "Málaga",
"ML", "Melilla", "MU", "Murcia", "NA", "Navarra",
"OR", "Ourense", "P", "Palencia", "PO", "Pontevedra",
"SA", "Salamanca", "TF", "Santa Cruz de Tenerife", "SG", "Segovia",
"SE", "Sevilla", "SO", "Soria", "T", "Tarragona",
"TE", "Teruel", "TO", "Toledo", "V", "Valencia",
"VA", "Valladolid", "BI", "Vizcaya", "ZA", "Zamora",
"Z", "Zaragoza",
),
},
"ET": {
Layout: "%1\n%2\n%3\n%P %L",
PostalCodePattern: `\d{4}`,
},
"FI": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{5}`,
},
"FK": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: "FIQQ 1ZZ",
},
"FM": {
Layout: "%1\n%2\n%3\n%L %R %P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion, FieldPostalCode},
RegionType: RegionTypeState,
PostalCodeType: PostalCodeTypeZip,
PostalCodePattern: `(9694[1-4])(?:[ \-](\d{4}))?`,
Regions: NewRegionMap(
"TRK", "Chuuk", "KSA", "Kosrae", "PNI", "Pohnpei",
"YAP", "Yap",
),
},
"FO": {
Layout: "%1\n%2\n%3\n%P %L",
PostalCodePattern: `\d{3}`,
},
"FR": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{2} ?\d{3}`,
RegionType: RegionTypeRegion,
},
"GB": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
LocalityType: LocalityTypeTownCity,
PostalCodePattern: `GIR ?0AA|(?:(?:AB|AL|B|BA|BB|BD|BF|BH|BL|BN|BR|BS|BT|BX|CA|CB|CF|CH|CM|CO|CR|CT|CV|CW|DA|DD|DE|DG|DH|DL|DN|DT|DY|E|EC|EH|EN|EX|FK|FY|G|GL|GY|GU|HA|HD|HG|HP|HR|HS|HU|HX|IG|IM|IP|IV|JE|KA|KT|KW|KY|L|LA|LD|LE|LL|LN|LS|LU|M|ME|MK|ML|N|NE|NG|NN|NP|NR|NW|OL|OX|PA|PE|PH|PL|PO|PR|RG|RH|RM|S|SA|SE|SG|SK|SL|SM|SN|SO|SP|SR|SS|ST|SW|SY|TA|TD|TF|TN|TQ|TR|TS|TW|UB|W|WA|WC|WD|WF|WN|WR|WS|WV|YO|ZE)(?:\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}))|BFPO ?\d{1,4}`,
},
"GE": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"GF": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `9[78]3\d{2}`,
},
"GG": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `GY\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}`,
},
"GI": {
Layout: "%1\n%2\n%3\n%P",
Required: []Field{FieldLine1},
PostalCodePattern: "GX11 1AA",
},
"GL": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `39\d{2}`,
},
"GN": {
Layout: "%P %1\n%2\n%3 %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{3}`,
},
"GP": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `9[78][01]\d{2}`,
},
"GR": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{3} ?\d{2}`,
},
"GS": {
Layout: "%1\n%2\n%3\n\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: "SIQQ 1ZZ",
},
"GT": {
Layout: "%1\n%2\n%3\n%P- %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"GU": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodeType: PostalCodeTypeZip,
PostalCodePattern: `(969(?:[12]\d|3[12]))(?:[ \-](\d{4}))?`,
},
"GW": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"HK": {
Locale: Locale{Language: "zh", Script: "Hant"},
Layout: "%1\n%2\n%3\n%L\n%R",
LocalLayout: "%R\n%L\n%1\n%2\n%3",
Required: []Field{FieldLine1, FieldRegion},
RegionType: RegionTypeArea,
LocalityType: LocalityTypeDistrict,
// HK areas have no ISO codes assigned.
Regions: NewRegionMap(
"Kowloon", "Kowloon",
"Hong Kong Island", "Hong Kong Island",
"New Territories", "New Territories",
),
LocalRegions: NewRegionMap(
"Kowloon", "九龍",
"Hong Kong Island", "香港島",
"New Territories", "新界",
),
},
"HM": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"HN": {
Layout: "%1\n%2\n%3\n%L, %R\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
RegionType: RegionTypeDepartment,
PostalCodePattern: `\d{5}`,
Regions: NewRegionMap(
"AT", "Atlántida", "CH", "Choluteca", "CL", "Colón",
"CM", "Comayagua", "CP", "Copán", "CR", "Cortés",
"EP", "El Paraíso", "FM", "Francisco Morazán", "GD", "Gracias a Dios",
"IN", "Intibucá", "IB", "Islas de la Bahía", "LP", "La Paz",
"LE", "Lempira", "OC", "Ocotepeque", "OL", "Olancho",
"SB", "Santa Bárbara", "VA", "Valle", "YO", "Yoro",
),
},
"HR": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"HT": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"HU": {
Layout: " %L\n%1\n%2\n%3\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{4}`,
},
"ID": {
Layout: "%1\n%2\n%3\n%L\n%R %P",
Required: []Field{FieldLine1, FieldRegion},
PostalCodePattern: `\d{5}`,
Regions: NewRegionMap(
"AC", "Aceh", "BA", "Bali", "BT", "Banten",
"BE", "Bengkulu", "YO", "D.I. Yogyakarta", "JK", "DKI Jakarta",
"GO", "Gorontalo", "JA", "Jambi", "JB", "Jawa Barat",
"JT", "Jawa Tengah", "JI", "Jawa Timur", "KB", "Kalimantan Barat",
"KS", "Kalimantan Selatan", "KT", "Kalimantan Tengah", "KI", "Kalimantan Timur",
"KU", "Kalimantan Utara", "BB", "Kepulauan Bangka Belitung", "KR", "Kepulauan Riau",
"LA", "Lampung", "MA", "Maluku", "MU", "Maluku Utara",
"NB", "Nusa Tenggara Barat", "NT", "Nusa Tenggara Timur", "PA", "Papua",
"PB", "Papua Barat", "PD", "Papua Barat Daya", "PE", "Papua Pengunungan",
"PS", "Papua Selatan", "PT", "Papua Tengah", "RI", "Riau",
"SR", "Sulawesi Barat", "SN", "Sulawesi Selatan", "ST", "Sulawesi Tengah",
"SG", "Sulawesi Tenggara", "SA", "Sulawesi Utara", "SB", "Sumatera Barat",
"SS", "Sumatera Selatan", "SU", "Sumatera Utara",
),
},
"IE": {
Layout: "%1\n%2\n%3\n%S\n%L\n%R\n%P",
Required: []Field{FieldLine1, FieldLocality},
RegionType: RegionTypeCounty,
SublocalityType: SublocalityTypeTownland,
PostalCodeType: PostalCodeTypeEir,
PostalCodePattern: `[\dA-Z]{3} ?[\dA-Z]{4}`,
Regions: NewRegionMap(
"CW", "Co Carlow", "CN", "Co Cavan", "CE", "Co Clare",
"CO", "Co Cork", "DL", "Co Donegal", "D", "Co Dublin",
"D1", "Dublin 1", "D2", "Dublin 2", "D3", "Dublin 3",
"D4", "Dublin 4", "D5", "Dublin 5", "D6", "Dublin 6",
"D6W", "Dublin 6w", "D7", "Dublin 7", "D8", "Dublin 8",
"D9", "Dublin 9", "D10", "Dublin 10", "D11", "Dublin 11",
"D12", "Dublin 12", "D13", "Dublin 13", "D14", "Dublin 14",
"D15", "Dublin 15", "D16", "Dublin 16", "D17", "Dublin 17",
"D18", "Dublin 18", "D19", "Dublin 19", "D20", "Dublin 20",
"D21", "Dublin 21", "D22", "Dublin 22", "D23", "Dublin 23",
"D24", "Dublin 24", "G", "Co Galway", "KY", "Co Kerry",
"KE", "Co Kildare", "KK", "Co Kilkenny", "LS", "Co Laois",
"LM", "Co Leitrim", "LK", "Co Limerick", "LD", "Co Longford",
"LH", "Co Louth", "MO", "Co Mayo", "MH", "Co Meath",
"MN", "Co Monaghan", "OY", "Co Offaly", "RN", "Co Roscommon",
"SO", "Co Sligo", "TA", "Co Tipperary", "WD", "Co Waterford",
"WH", "Co Westmeath", "WX", "Co Wexford", "WW", "Co Wicklow",
),
},
"IL": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}(?:\d{2})?`,
},
"IM": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `IM\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}`,
},
"IN": {
Layout: "%1\n%2\n%3\n%L %P\n%R",
Required: []Field{FieldLine1, FieldLocality, FieldRegion, FieldPostalCode},
RegionType: RegionTypeState,
PostalCodeType: PostalCodeTypePin,
PostalCodePattern: `\d{6}`,
Regions: NewRegionMap(
"AN", "Andaman & Nicobar", "AP", "Andhra Pradesh", "AR", "Arunachal Pradesh",
"AS", "Assam", "BR", "Bihar", "CH", "Chandigarh",
"CG", "Chhattisgarh", "DH", "Dadra & Nagar Haveli & Daman & Diu",
"DL", "Delhi", "GA", "Goa", "GJ", "Gujarat",
"HR", "Haryana", "HP", "Himachal Pradesh", "JK", "Jammu & Kashmir",
"JH", "Jharkhand", "KA", "Karnataka", "KL", "Kerala",
"LA", "Ladakh", "LD", "Lakshadweep", "MP", "Madhya Pradesh",
"MH", "Maharashtra", "MN", "Manipur", "ML", "Meghalaya",
"MZ", "Mizoram", "NL", "Nagaland", "OD", "Odisha",
"PY", "Puducherry", "PB", "Punjab", "RJ", "Rajasthan",
"SK", "Sikkim", "TN", "Tamil Nadu", "TS", "Telangana",
"TR", "Tripura", "UP", "Uttar Pradesh", "UK", "Uttarakhand",
"WB", "West Bengal",
),
},
"IO": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: "BBND 1ZZ",
},
"IQ": {
Layout: "%1\n%2\n%3\n%L, %R\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
PostalCodePattern: `\d{5}`,
},
"IR": {
Layout: "%R\n%L, %S\n%1\n%2\n%3\n%P",
Required: []Field{FieldLine1, FieldLocality},
SublocalityType: SublocalityTypeNeighborhood,
PostalCodePattern: `\d{5}-?\d{5}`,
},
"IS": {
Layout: "%1\n%2\n%3\n%P %L",
PostalCodePattern: `\d{3}`,
},
"IT": {
Layout: "%1\n%2\n%3\n%P %L %R",
Required: []Field{FieldLine1, FieldLocality, FieldRegion, FieldPostalCode},
PostalCodePattern: `\d{5}`,
ShowRegionID: true,
Regions: NewRegionMap(
"AG", "Agrigento", "AL", "Alessandria", "AN", "Ancona",
"AO", "Aosta", "AR", "Arezzo", "AP", "Ascoli Piceno",
"AT", "Asti", "AV", "Avellino", "BA", "Bari",
"BT", "Barletta-Andria-Trani", "BL", "Belluno", "BN", "Benevento",
"BG", "Bergamo", "BI", "Biella", "BO", "Bologna",
"BZ", "Bolzano", "BS", "Brescia", "BR", "Brindisi",
"CA", "Cagliari", "CL", "Caltanissetta", "CB", "Campobasso",
"CE", "Caserta", "CT", "Catania", "CZ", "Catanzaro",
"CH", "Chieti", "CO", "Como", "CS", "Cosenza",
"CR", "Cremona", "KR", "Crotone", "CN", "Cuneo",
"EN", "Enna", "FM", "Fermo", "FE", "Ferrara",
"FI", "Firenze", "FG", "Foggia", "FC", "Forlì-Cesena",
"FR", "Frosinone", "GE", "Genova", "GO", "Gorizia",
"GR", "Grosseto", "IM", "Imperia", "IS", "Isernia",
"AQ", "L'Aquila", "SP", "La Spezia", "LT", "Latina",
"LE", "Lecce", "LC", "Lecco", "LI", "Livorno",
"LO", "Lodi", "LU", "Lucca", "MC", "Macerata",
"MN", "Mantova", "MS", "Massa-Carrara", "MT", "Matera",
"ME", "Messina", "MI", "Milano", "MO", "Modena",
"MB", "Monza e Brianza", "NA", "Napoli", "NO", "Novara",
"NU", "Nuoro", "OR", "Oristano", "PD", "Padova",
"PA", "Palermo", "PR", "Parma", "PV", "Pavia",
"PG", "Perugia", "PU", "Pesaro e Urbino", "PE", "Pescara",
"PC", "Piacenza", "PI", "Pisa", "PT", "Pistoia",
"PN", "Pordenone", "PZ", "Potenza", "PO", "Prato",
"RG", "Ragusa", "RA", "Ravenna", "RC", "Reggio Calabria",
"RE", "Reggio Emilia", "RI", "Rieti", "RN", "Rimini",
"RM", "Roma", "RO", "Rovigo", "SA", "Salerno",
"SS", "Sassari", "SV", "Savona", "SI", "Siena",
"SR", "Siracusa", "SO", "Sondrio", "SU", "Sud Sardegna",
"TA", "Taranto", "TE", "Teramo", "TR", "Terni",
"TO", "Torino", "TP", "Trapani", "TN", "Trento",
"TV", "Treviso", "TS", "Trieste", "UD", "Udine",
"VA", "Varese", "VE", "Venezia", "VB", "Verbano-Cusio-Ossola",
"VC", "Vercelli", "VR", "Verona", "VV", "Vibo Valentia",
"VI", "Vicenza", "VT", "Viterbo",
),
},
"JE": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `JE\d[\dA-Z]? ?\d[ABD-HJLN-UW-Z]{2}`,
},
"JM": {
Layout: "%1\n%2\n%3\n%L\n%R",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
RegionType: RegionTypeParish,
Regions: NewRegionMap(
"13", "Clarendon", "09", "Hanover", "01", "Kingston",
"12", "Manchester", "04", "Portland", "02", "St. Andrew",
"06", "St. Ann", "14", "St. Catherine", "11", "St. Elizabeth",
"08", "St. James", "05", "St. Mary", "03", "St. Thomas",
"07", "Trelawny", "10", "Westmoreland",
),
},
"JO": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"JP": {
Locale: Locale{Language: "ja"},
Layout: "%1\n%2\n%3\n%L, %R\n%P",
LocalLayout: "〒%P\n%R%L\n%1\n%2\n%3",
Required: []Field{FieldLine1, FieldRegion, FieldPostalCode},
RegionType: RegionTypePrefecture,
PostalCodePattern: `\d{3}-?\d{4}`,
Regions: NewRegionMap(
"23", "Aichi", "05", "Akita", "02", "Aomori",
"12", "Chiba", "38", "Ehime", "18", "Fukui",
"40", "Fukuoka", "07", "Fukushima", "21", "Gifu",
"10", "Gunma", "34", "Hiroshima", "01", "Hokkaido",
"28", "Hyogo", "08", "Ibaraki", "17", "Ishikawa",
"03", "Iwate", "37", "Kagawa", "46", "Kagoshima",
"14", "Kanagawa", "39", "Kochi", "43", "Kumamoto",
"26", "Kyoto", "24", "Mie", "04", "Miyagi",
"45", "Miyazaki", "20", "Nagano", "42", "Nagasaki",
"29", "Nara", "15", "Niigata", "44", "Oita",
"33", "Okayama", "47", "Okinawa", "27", "Osaka",
"41", "Saga", "11", "Saitama", "25", "Shiga",
"32", "Shimane", "22", "Shizuoka", "09", "Tochigi",
"36", "Tokushima", "13", "Tokyo", "31", "Tottori",
"16", "Toyama", "30", "Wakayama", "06", "Yamagata",
"35", "Yamaguchi", "19", "Yamanashi",
),
LocalRegions: NewRegionMap(
"01", "北海道", "02", "青森県", "03", "岩手県",
"04", "宮城県", "05", "秋田県", "06", "山形県",
"07", "福島県", "08", "茨城県", "09", "栃木県",
"10", "群馬県", "11", "埼玉県", "12", "千葉県",
"13", "東京都", "14", "神奈川県", "15", "新潟県",
"16", "富山県", "17", "石川県", "18", "福井県",
"19", "山梨県", "20", "長野県", "21", "岐阜県",
"22", "静岡県", "23", "愛知県", "24", "三重県",
"25", "滋賀県", "26", "京都府", "27", "大阪府",
"28", "兵庫県", "29", "奈良県", "30", "和歌山県",
"31", "鳥取県", "32", "島根県", "33", "岡山県",
"34", "広島県", "35", "山口県", "36", "徳島県",
"37", "香川県", "38", "愛媛県", "39", "高知県",
"40", "福岡県", "41", "佐賀県", "42", "長崎県",
"43", "熊本県", "44", "大分県", "45", "宮崎県",
"46", "鹿児島県", "47", "沖縄県",
),
},
"KE": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"KG": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{6}`,
},
"KH": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5,6}`,
},
"KI": {
Layout: "%1\n%2\n%3\n%R\n%L",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
RegionType: RegionTypeIsland,
Regions: NewRegionMap(
"G", "Gilbert Islands", "L", "Line Islands", "P", "Phoenix Islands",
),
},
"KN": {
Layout: "%1\n%2\n%3\n%L, %R",
Required: []Field{FieldLine1, FieldLocality, FieldRegion},
RegionType: RegionTypeIsland,
},
"KP": {
Locale: Locale{Language: "ko"},
Layout: "%1\n%2\n%3\n%L\n%R, %P",
LocalLayout: "%P\n%R\n%L\n%1\n%2\n%3",
Required: []Field{FieldLine1, FieldLocality},
},
"KR": {
Locale: Locale{Language: "ko"},
Layout: "%1\n%2\n%3\n%S\n%L\n%R\n%P",
LocalLayout: "%R %L%S\n%1\n%2\n%3",
Required: []Field{FieldLine1, FieldLocality, FieldRegion, FieldPostalCode},
RegionType: RegionTypeDoSi,
SublocalityType: SublocalityTypeDistrict,
PostalCodePattern: `\d{5}`,
Regions: NewRegionMap(
"26", "Busan", "43", "Chungcheongbuk-do", "44", "Chungcheongnam-do",
"27", "Daegu", "30", "Daejeon", "42", "Gangwon-do",
"41", "Gyeonggi-do", "47", "Gyeongsangbuk-do", "48", "Gyeongsangnam-do",
"29", "Gwangju", "28", "Incheon", "49", "Jeju-do",
"45", "Jeollabuk-do", "46", "Jeollanam-do", "50", "Sejong",
"11", "Seoul", "31", "Ulsan",
),
LocalRegions: NewRegionMap(
"42", "강원", "41", "경기", "48", "경남",
"47", "경북", "29", "광주", "27", "대구",
"30", "대전", "26", "부산", "11", "서울",
"50", "세종", "31", "울산", "28", "인천",
"46", "전남", "45", "전북", "49", "제주",
"44", "충남", "43", "충북",
),
},
"KW": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"KY": {
Layout: "%1\n%2\n%3\n%R %P",
Required: []Field{FieldLine1, FieldRegion},
RegionType: RegionTypeIsland,
PostalCodePattern: `KY\d-\d{4}`,
},
"KZ": {
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",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"LB": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `(?:\d{4})(?: ?(?:\d{4}))?`,
},
"LI": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `948[5-9]|949[0-8]`,
},
"LK": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"LR": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"LS": {
Layout: "%1\n%2\n%3\n%L %P",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{3}`,
},
"LT": {
Layout: "%1\n%2\n%3\n%P %L %R",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
RegionType: RegionTypeCounty,
PostalCodePattern: `\d{5}`,
},
"LU": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `\d{4}`,
},
"LV": {
Layout: "%1\n%2\n%3\n%L, %P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `LV-\d{4}`,
},
"MA": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{5}`,
},
"MC": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `980\d{2}`,
},
"MD": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{4}`,
},
"ME": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `8\d{4}`,
},
"MF": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
PostalCodePattern: `9[78][01]\d{2}`,
},
"MG": {
Layout: "%1\n%2\n%3\n%P %L",
Required: []Field{FieldLine1, FieldLocality},
PostalCodePattern: `\d{3}`,
},
"MH": {
Layout: "%1\n%2\n%3\n%L %R %P",