Skip to content

fix(isMobilePhone): add missing Uzbekistan (uz-UZ) mobile carrier prefixes#2688

Open
mahmoodhamdi wants to merge 1 commit intovalidatorjs:masterfrom
mahmoodhamdi:fix/uz-UZ-mobile-phone-prefixes
Open

fix(isMobilePhone): add missing Uzbekistan (uz-UZ) mobile carrier prefixes#2688
mahmoodhamdi wants to merge 1 commit intovalidatorjs:masterfrom
mahmoodhamdi:fix/uz-UZ-mobile-phone-prefixes

Conversation

@mahmoodhamdi
Copy link

Fixes #2683

The uz-UZ regex was missing several active mobile carrier prefixes. Valid Uzbekistan phone numbers using these prefixes were incorrectly rejected.

Added prefixes:

Prefix Operator
33 Humans
50 Ucell
77 Uzmobile (GSM)
80 Perfectum Mobile
87 MOBIUZ

Also expanded the 7x range from 7[1-69] to 7[1-9] to include 77 and 78.

References:

Changes:

  • src/lib/isMobilePhone.js: Updated regex from (6[125-79]|7[1-69]|88|9\d) to (33|50|6[125-79]|7[1-9]|8[078]|9\d)
  • test/validators.test.js: Added valid test cases for all new prefixes, removed 870123456 from invalid list (now correctly valid as MOBIUZ prefix)

All 317 tests pass.

…fixes

Add prefixes for Humans (33), Ucell (50), Uzmobile (77), Perfectum
Mobile (80), and MOBIUZ (87) based on the Uzbekistan Golden Pages
directory (goldenpages.uz/en/cellular) and the ITU numbering plan.

Fixes validatorjs#2683
@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9fa1e3a) to head (998752b).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2688   +/-   ##
=========================================
  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.

@mahmoodhamdi
Copy link
Author

Thanks for the review and approval, @rubiin! Appreciate your time.

@rubiin rubiin requested a review from WikiRik March 16, 2026 21:36
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.

isMobilePhone('uz-UZ') returns false for valid Uzbekistan carrier codes (e.g., 77)

2 participants