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) Fix Mobile Phone Regex Pakistan(PK) #1778

Merged
merged 5 commits into from
Oct 30, 2021

Conversation

hammad20120
Copy link
Contributor

@hammad20120 hammad20120 commented Oct 12, 2021

Fixed the mobile phone regex for Pakistan.
Reference: 1, 2

Added tests for mobile phone, local en-PK (Pakistan)

Checklist

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

@codecov
Copy link

codecov bot commented Oct 12, 2021

Codecov Report

Merging #1778 (062e394) into master (13651ea) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1778   +/-   ##
=========================================
  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...062e394. Read the comment docs.

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 @hammad20120 looks like your regex is also validating landline numbers. Please check and address my comment below!

src/lib/isMobilePhone.js Outdated Show resolved Hide resolved
hammad20120 and others added 2 commits October 19, 2021 19:44
Update pakistan mobile regex according to suggestion

Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>
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 making the necessary changes! LGTM 🎉

@tux-tn tux-tn added hacktoberfest-accepted ready-to-land For PRs that are reviewed and ready to be landed 🎉 first-pr labels Oct 19, 2021
Copy link
Member

@profnandaa profnandaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for your contrib! 🎉

@profnandaa profnandaa merged commit 050a424 into validatorjs:master Oct 30, 2021
theteladras pushed a commit to theteladras/validator.js that referenced this pull request Oct 30, 2021
* Fix Mobile Phone Regex Pakistan(PK)

Update the regex to validate mobile numbers correctly for Pakistan

* Add tests for mobile number validation locale en-PK (Pakistan)

* Linting fix

* Update src/lib/isMobilePhone.js

Update pakistan mobile regex according to suggestion

Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>

* Update tests for PK phone numbers

Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>
profnandaa pushed a commit that referenced this pull request Oct 31, 2021
* Fix Mobile Phone Regex Pakistan(PK)

Update the regex to validate mobile numbers correctly for Pakistan

* Add tests for mobile number validation locale en-PK (Pakistan)

* Linting fix

* Update src/lib/isMobilePhone.js

Update pakistan mobile regex according to suggestion

Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>

* Update tests for PK phone numbers

Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>
profnandaa pushed a commit that referenced this pull request Oct 31, 2021
* Fix Mobile Phone Regex Pakistan(PK)

Update the regex to validate mobile numbers correctly for Pakistan

* Add tests for mobile number validation locale en-PK (Pakistan)

* Linting fix

* Update src/lib/isMobilePhone.js

Update pakistan mobile regex according to suggestion

Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>

* Update tests for PK phone numbers

Co-authored-by: Sarhan Aissi <tux-tn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 first-pr hacktoberfest-accepted 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.

None yet

3 participants