Skip to content

feat: add postcode patterns for Colombia (CO) and British Virgin Islands (VG)#1547

Open
j-ibarra wants to merge 1 commit intogo-playground:masterfrom
j-ibarra:feat/add-postcode-co-vg
Open

feat: add postcode patterns for Colombia (CO) and British Virgin Islands (VG)#1547
j-ibarra wants to merge 1 commit intogo-playground:masterfrom
j-ibarra:feat/add-postcode-co-vg

Conversation

@j-ibarra
Copy link

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

…nds (VG)

- CO: 6-digit format used by Código Postal Colombiano (^\d{6}$)
- VG: BVI postcode format introduced by the BVI Postal Service (^VG\d{4}$)

Both country codes are present in iso3166_1_alpha2 but were missing
from postCodePatternDict, causing postcode_iso3166_alpha2 validation
to unconditionally fail for these countries.
@j-ibarra j-ibarra requested a review from a team as a code owner March 19, 2026 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant