Commit b9f1d79
authored
feat: add postcode patterns for Colombia (CO) and British Virgin Islands (VG) (#1547)
## Summary
Two ISO 3166-1 alpha-2 country codes are present in `iso3166_1_alpha2`
(i.e., valid countries) but missing from `postCodePatternDict`, causing
`postcode_iso3166_alpha2` and `postcode_iso3166_alpha2_field` validators
to unconditionally return `false` for these countries.
This PR adds the missing patterns:
| Country | Code | Pattern | Example |
|---------|------|---------|---------|
| Colombia | `CO` | `^\d{6}$` | `110111` |
| British Virgin Islands | `VG` | `^VG\d{4}$` | `VG1110` |
### References
- Colombia postal code system (Código Postal Colombiano): 6-digit
numeric format
- BVI postal code system introduced by the BVI Postal Service: `VG`
prefix followed by 4 digits (e.g. `VG1110`, `VG1120`)
## Test plan
- All existing tests pass (`go test ./...`)
- Both patterns follow the same conventions as surrounding entries in
`postcode_regexes.go`1 parent 7fa9599 commit b9f1d79
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
149 | 150 | | |
150 | 151 | | |
151 | 152 | | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
0 commit comments