Skip to content

Commit

Permalink
Change the locality type for Great Britain to town/city.
Browse files Browse the repository at this point in the history
  • Loading branch information
bojanz committed Oct 7, 2023
1 parent 3bcd04c commit 0e6566d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions const.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ const (
LocalityTypeDistrict
LocalityTypePostTown
LocalityTypeSuburb
LocalityTypeTownCity
)

var localityTypeNames = [...]string{"city", "district", "post_town", "suburb"}
Expand Down
2 changes: 1 addition & 1 deletion formats.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ var formats = map[string]Format{
"GB": {
Layout: "%1\n%2\n%3\n%L\n%P",
Required: []Field{FieldLine1, FieldLocality, FieldPostalCode},
LocalityType: LocalityTypePostTown,
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": {
Expand Down

0 comments on commit 0e6566d

Please sign in to comment.