Skip to content

feat(isMobilePhone): add en-GM locale for The Gambia - #2870

Open
ginxx009 wants to merge 7 commits into
validatorjs:masterfrom
ginxx009:feat/isMobilePhone-en-GM
Open

feat(isMobilePhone): add en-GM locale for The Gambia#2870
ginxx009 wants to merge 7 commits into
validatorjs:masterfrom
ginxx009:feat/isMobilePhone-en-GM

Conversation

@ginxx009

@ginxx009 ginxx009 commented Aug 28, 2026

Copy link
Copy Markdown

Adds en-GM mobile phone validation for The Gambia.

Gambia uses country code +220. National mobile numbers are currently 7 digits, and PURA is migrating Africell, QCell and Comium to 9 digits from 4 September 2026 (dual-dial period through 30 November 2026). Gamcel stays on 7 digits for now.

7-digit mobile prefixes

  • Africell: 2xx, 7xx, 40x, 41x
  • QCell: 3xx, 50–53, 58–59
  • Comium: 6xx
  • Gamcel: 9xx

9-digit PURA prefixes (existing 7-digit number plus operator prefix)

  • Africell: 87 + 7 digits
  • QCell: 83 + 7 digits
  • Comium: 86 + 7 digits

Regex:

'en-GM': /^(\+?220)?(?:(?:2\d|3\d|40|41|5[0-38-9]|6\d|7\d|9\d)\d{5}|(?:83|86|87)\d{7})$/,

Accepts optional +220 / 220, current 7-digit mobiles, and the new 9-digit forms. Rejects landline blocks such as 42x/43x and other 8x prefixes that are not part of the PURA mobile migration.
Checked master and open PRs; no existing en-GM locale.
Refs #1761

https://en.wikipedia.org/wiki/Telephone_numbers_in_the_Gambia
https://pura.gm/public-notice-migration-of-the-national-mobile-numbering-plan-from-7-digit-to-9-digit-format/

## Checklist

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

@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a79ff98) to head (88cd6a6).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2870   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2599      2599           
  Branches       658       658           
=========================================
  Hits          2599      2599           

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant