Add Indonesia (ID) postal code regex - #16
Merged
ankitgadling merged 1 commit intoOct 3, 2025
Merged
Conversation
Owner
|
Thanks @0xReLogic for adding Indonesia Regex looks good. Could you extend this to at least 5 countries in this PR (same format)? That’ll give us broader coverage in one go. |
- Add Indonesia (ID): 5-digit postal codes - Add Bangladesh (BD): 4-digit postal codes - Add Pakistan (PK): 5-digit postal codes - Add Sri Lanka (LK): 5-digit postal codes - Add Nepal (NP): 5-digit postal codes Total: 5 countries added with proper regex patterns, sample valid/invalid codes, local names, and descriptions. Refs #1 Signed-off-by: Allen Elzayn <maedeeaew@gmail.com>
Contributor
Author
|
Hi @ankitgadling! Thanks for the feedback. I've updated the PR to include 5 South Asian countries:
All entries follow the same format with proper regex patterns, sample valid/invalid codes, local names in native scripts, and descriptions. Please let me know if you need any adjustments! |
ankitgadling
approved these changes
Oct 3, 2025
harshadarayate
added a commit
to harshadarayate/postal-regex
that referenced
this pull request
Oct 7, 2025
…countries (ID, BD, PK, LK, NP) - Includes code snippets for `validate()` calls with sample postal codes from commit ankitgadling#16 - Highlights expected `True` outputs in bold for clarity - Consistent with existing examples (IN, US); tested locally via `pip install -e .`
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.
Description
This PR adds postal code validation support for Indonesia (ID).
Changes
Added entry for Indonesia in
src/postal_regex/data/postal_codes.json:^[0-9]{5}$)Testing
Refs #1