Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

mgndolan
Copy link
Contributor

@mgndolan mgndolan commented Oct 10, 2021

In this PR, I added an additional isMobilePhone case for Botswana. I also updated the README file and added appropriate test cases.

Checklist

  • PR contains only changes related; no stray files, etc.
  • README updated (where applicable)
  • Tests written (where applicable)

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
Copy link

codecov bot commented Oct 10, 2021

Codecov Report

Merging #1771 (b3ef463) into master (13651ea) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1771   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       102           
  Lines         2029      2029           
  Branches       457       457           
=========================================
  Hits          2029      2029           
Impacted Files Coverage Δ
src/lib/isMobilePhone.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 13651ea...b3ef463. Read the comment docs.

@mgndolan mgndolan changed the title Fixed mobile phone validation for en-BW feat: (isMobilePhone) Fixed mobile phone validation for en-BW Oct 11, 2021
@mgndolan mgndolan changed the title feat: (isMobilePhone) Fixed mobile phone validation for en-BW feat: (isMobilePhone) Added mobile phone validation for en-BW Oct 11, 2021
Copy link
Member

@tux-tn tux-tn left a 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?

src/lib/isMobilePhone.js Outdated Show resolved Hide resolved
@tux-tn tux-tn added 🎉 first-pr 🧹 needs-update For PRs that need to be updated before landing labels Oct 18, 2021
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!
@mgndolan mgndolan requested a review from tux-tn October 23, 2021 19:10
Copy link
Member

@tux-tn tux-tn left a 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 🎉

@tux-tn tux-tn added hacktoberfest-accepted ready-to-land For PRs that are reviewed and ready to be landed and removed 🧹 needs-update For PRs that need to be updated before landing labels Oct 25, 2021
@profnandaa profnandaa added the mc-to-land Just merge-conflict standing between the PR and landing. label Oct 30, 2021
@profnandaa
Copy link
Member

@mgndolan -- pls fix the merge conflict on README and we should be good to go.

@profnandaa profnandaa changed the title feat: (isMobilePhone) Added mobile phone validation for en-BW feat(isMobilePhone): add en-BW locale Oct 31, 2021
@profnandaa
Copy link
Member

No worries, your work is now included here #1851

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 first-pr hacktoberfest-accepted mc-to-land Just merge-conflict standing between the PR and landing. ready-to-land For PRs that are reviewed and ready to be landed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants