Skip to content

feat(isMobilePhone): add Djibouti (fr-DJ) mobile phone validation#2676

Merged
rubiin merged 4 commits intovalidatorjs:masterfrom
Kartikeya-guthub:feat/isMobilePhone-djibouti-validation
Mar 7, 2026
Merged

feat(isMobilePhone): add Djibouti (fr-DJ) mobile phone validation#2676
rubiin merged 4 commits intovalidatorjs:masterfrom
Kartikeya-guthub:feat/isMobilePhone-djibouti-validation

Conversation

@Kartikeya-guthub
Copy link
Copy Markdown
Contributor

@Kartikeya-guthub Kartikeya-guthub commented Mar 4, 2026

Summary
Add mobile phone validation support for Djibouti (fr-DJ locale).

Description
The 2012 International Telecommunication Union document https://www.itu.int/dms_pub/itu-t/opb/sp/T-SP-OB.998-2012-OAS-PDF-E.pdf (pages 8–11) remains one of the clearest primary references for Djibouti’s 8-digit mobile numbering migration, while later references generally confirm the same numbering structure without detailed prefix tables.

The regex ^(?:\+253)?77[6-8]\d{5}$ was selected because it aligns with currently documented mobile allocations in Djibouti, specifically the published 776–778 ranges used by Djibouti Telecom. It validates the present known active mobile prefixes together with the optional +253 country code, making it more accurate for current numbering data than a broader pattern that would also admit undocumented ranges.

Addresses #1761

Changes

  • Add fr-DJ regex pattern to isMobilePhone.js
  • Add tests for valid and invalid numbers
  • Update README.md

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)
  • References provided in PR (where applicable)

Copy link
Copy Markdown
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution, just one comment.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e8c6914) to head (38c7720).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2676   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2595      2595           
  Branches       659       659           
=========================================
  Hits          2595      2595           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Kartikeya-guthub Kartikeya-guthub changed the title feat(isMobilePhone): add Djibouti (dj-DJ) mobile phone validation feat(isMobilePhone): add Djibouti (fr-DJ) mobile phone validation Mar 5, 2026
profnandaa
profnandaa previously approved these changes Mar 5, 2026
@Kartikeya-guthub
Copy link
Copy Markdown
Contributor Author

@rubiin @WikiRik If either of you has time, one more review would be appreciated since the PR now has one approval. Thanks 🙏

@Kartikeya-guthub Kartikeya-guthub requested a review from WikiRik March 6, 2026 17:11
@Kartikeya-guthub
Copy link
Copy Markdown
Contributor Author

Kartikeya-guthub commented Mar 7, 2026

Friendly follow-up: all checks and approvals are complete ✅ Let me know if anything else is needed for merge.
@profnandaa @rubiin @WikiRik @ezkemboi

@rubiin rubiin merged commit b1aea75 into validatorjs:master Mar 7, 2026
12 checks passed
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.

4 participants