Skip to content

Add Indonesia (ID) postal code regex - #16

Merged
ankitgadling merged 1 commit into
ankitgadling:mainfrom
0xReLogic:add-indonesia-postal-code
Oct 3, 2025
Merged

Add Indonesia (ID) postal code regex#16
ankitgadling merged 1 commit into
ankitgadling:mainfrom
0xReLogic:add-indonesia-postal-code

Conversation

@0xReLogic

Copy link
Copy Markdown
Contributor

Description

This PR adds postal code validation support for Indonesia (ID).

Changes

Added entry for Indonesia in src/postal_regex/data/postal_codes.json:

  • Country code: ID
  • Format: 5 digits (^[0-9]{5}$)
  • Sample valid: 12345
  • Sample invalid: ABCDE
  • Local name: Indonesia
  • Description: Indonesian postal codes are five digits

Testing

  • ✅ Entry added following the existing format
  • ✅ Regex pattern validated

Refs #1

@ankitgadling

Copy link
Copy Markdown
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>
@0xReLogic

0xReLogic commented Oct 3, 2025

Copy link
Copy Markdown
Contributor Author

Hi @ankitgadling! Thanks for the feedback.

I've updated the PR to include 5 South Asian countries:

  • 🇮🇩 Indonesia (5 digits)
  • 🇧🇩 Bangladesh (4 digits)
  • 🇵🇰 Pakistan (5 digits)
  • 🇱k Sri Lanka (5 digits)
  • 🇳🇵 Nepal (5 digits)

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
ankitgadling merged commit 0919017 into ankitgadling:main Oct 3, 2025
2 checks passed
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 .`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants