Skip to content

Add Romanian postal code validator - #12

Merged
Robert-GeorgeDev merged 1 commit into
Robert-GeorgeDev:mainfrom
jay23606:pr-go/11-add-a-validator-for-romanian-postal-code
Oct 27, 2026
Merged

Robert-GeorgeDev merged 1 commit into
Robert-GeorgeDev:mainfrom
jay23606:pr-go/11-add-a-validator-for-romanian-postal-code

Conversation

@jay23606

Copy link
Copy Markdown
Contributor

Adds validatePostalCode and isValidPostalCode for the six-digit Romanian postal code format documented by Po?ta Rom�na. The validator returns a typed result and Romanian error message; county lookup is left optional as stated in the issue.

Tested with npx vitest run test/postal-code.test.ts and npm run typecheck.

Regression test: fails on base twice (/Cannot find module '../src/postal-code.js'/), passes on fix twice (npx vitest run test/postal-code.test.ts)

Fixes #11

@jay23606

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

@Robert-GeorgeDev
Robert-GeorgeDev merged commit 95a598d into Robert-GeorgeDev:main Oct 27, 2026

Copy link
Copy Markdown
Owner

Thanks @jay23606! Merged together with a small follow-up in #14 that ignores spaces in the input, like the other validators do. This will ship in the next release.


Generated by Claude Code

@jay23606
jay23606 deleted the pr-go/11-add-a-validator-for-romanian-postal-code branch October 27, 2026 21:28
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.

Add a validator for Romanian postal codes

2 participants