feat: add postcode patterns for Colombia (CO) and British Virgin Islands (VG)#1547
Open
j-ibarra wants to merge 1 commit intogo-playground:masterfrom
Open
feat: add postcode patterns for Colombia (CO) and British Virgin Islands (VG)#1547j-ibarra wants to merge 1 commit intogo-playground:masterfrom
j-ibarra wants to merge 1 commit intogo-playground:masterfrom
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two ISO 3166-1 alpha-2 country codes are present in
iso3166_1_alpha2(i.e., valid countries) but missing frompostCodePatternDict, causingpostcode_iso3166_alpha2andpostcode_iso3166_alpha2_fieldvalidators to unconditionally returnfalsefor these countries.This PR adds the missing patterns:
CO^\d{6}$110111VG^VG\d{4}$VG1110References
VGprefix followed by 4 digits (e.g.VG1110,VG1120)Test plan
go test ./...)postcode_regexes.go