fix(isMobilePhone): update tg-TJ locale to include all valid operator codes#2679
Open
easedu wants to merge 1 commit intovalidatorjs:masterfrom
Open
fix(isMobilePhone): update tg-TJ locale to include all valid operator codes#2679easedu wants to merge 1 commit intovalidatorjs:masterfrom
easedu wants to merge 1 commit intovalidatorjs:masterfrom
Conversation
… codes Add missing operator codes 90 and 91 to Tajikistan mobile phone regex. Updated regex now covers all valid codes: 00, 55, 88, 90, 91, 92, 93, 95, 98, 99. Closes validatorjs#2544
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2679 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 114 114
Lines 2595 2595
Branches 659 659
=========================================
Hits 2595 2595 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
Fixes the
tg-TJ(Tajikistan) regex inisMobilePhonewhich wasincorrectly rejecting valid mobile phone numbers, as reported in #2544.
Problem
The existing regex did not cover all valid Tajik mobile operator codes.
Numbers with codes
90and91were incorrectly rejected:Fix
Updated the regex to include all valid operator codes for Tajikistan:
00,55,88,90,91,92,93,95,98,99.Tests
Added test cases for previously failing numbers and ensured existing
valid numbers continue to pass.
Checklist
Closes #2544