Skip to content

changed regex for VN#269

Merged
melwynfurtado merged 1 commit intomelwynfurtado:masterfrom
hmarth:master
Mar 20, 2026
Merged

changed regex for VN#269
melwynfurtado merged 1 commit intomelwynfurtado:masterfrom
hmarth:master

Conversation

@hmarth
Copy link
Copy Markdown
Contributor

@hmarth hmarth commented Mar 18, 2026

What is this PR for?

Update Vietnam (VN) postcode validation to support the official 5-digit format.

Currently, the validator strictly enforces a 6-digit format for Vietnam. However, according to the Ministry of Information and Communications (MIC) of Vietnam (Decision 2495/QD-BTTTT) and the Universal Postal Union (UPU), Vietnam officially transitioned to a 5-digit postal code system on January 1, 2018.

This PR updates the regex for CountryCode.VN to /^\d{5,6}$/.

Why 5 to 6 digits? While 5 digits is the current official standard, many legacy systems, international couriers, and users still utilize the older 6-digit format (often by appending a '0'). Supporting both ensures backward compatibility while aligning with the modern national standard.

Who should review this PR?

@melwynfurtado (or any maintainers responsible for regional validation updates).

Sources:

@melwynfurtado
Copy link
Copy Markdown
Owner

Thanks for the update 🙂

@melwynfurtado melwynfurtado merged commit 696019a into melwynfurtado:master Mar 20, 2026
1 check passed
@hmarth
Copy link
Copy Markdown
Contributor Author

hmarth commented Mar 25, 2026

@melwynfurtado thank you! Can you please create a new version with this fix?
latest version seems still to be 3.10.11

@melwynfurtado
Copy link
Copy Markdown
Owner

🎉 This PR is included in version 3.10.12 🎉

The release is available on:

Your semantic-release bot 📦🚀

@melwynfurtado
Copy link
Copy Markdown
Owner

@melwynfurtado thank you! Can you please create a new version with this fix?
latest version seems still to be 3.10.11

Included now, didn't realise the commit message was not as per semantic release's conventional commit format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants