-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(isMobilePhone): add en-BW locale #1771
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.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR @mgndolan ! Can you please address my comment?
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!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ! Thank you for making the necessary changes 🎉
@mgndolan -- pls fix the merge conflict on README and we should be good to go. |
No worries, your work is now included here #1851 |
In this PR, I added an additional isMobilePhone case for Botswana. I also updated the README file and added appropriate test cases.
Checklist