feat(isMobilePhone): add en-BW locale#1771
Closed
mgndolan wants to merge 5 commits intovalidatorjs:masterfrom
Closed
feat(isMobilePhone): add en-BW locale#1771mgndolan wants to merge 5 commits intovalidatorjs:masterfrom
mgndolan wants to merge 5 commits intovalidatorjs:masterfrom
Conversation
New regex for Botswana numbers Phone number information was found from the following sources: - https://www.howtocallabroad.com/botswana/ - https://countrycode.org/botswana
Included the new case for Botswana (en-BW)
Added some test cases to check length for the phone number & area code pattern.
Codecov Report
@@ Coverage Diff @@
## master #1771 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 102 102
Lines 2029 2029
Branches 457 457
=========================================
Hits 2029 2029
Continue to review full report at Codecov.
|
Fixed the pattern for Botswana mobile phone numbers and edited the test cases. I followed the convention from Table 8 of the national numbering plan document and the mobile number pattern on the Wiki page.
Oops! Looks like the file didn't update with some of my modified test cases - my apologies!
tux-tn
approved these changes
Oct 25, 2021
Member
tux-tn
left a comment
There was a problem hiding this comment.
LGTM ! Thank you for making the necessary changes 🎉
Member
|
@mgndolan -- pls fix the merge conflict on README and we should be good to go. |
Member
|
No worries, your work is now included here #1851 |
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.
In this PR, I added an additional isMobilePhone case for Botswana. I also updated the README file and added appropriate test cases.
Checklist