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(isPhoneNumber): Add isPhoneNumber validator and tests #1917

Closed
wants to merge 2 commits into from
Closed

feat(isPhoneNumber): Add isPhoneNumber validator and tests #1917

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Jan 28, 2022

Add isPhoneNumber validator in reference to issue #1915.
Create isPhoneNumber.js, and add it to index.js, README.md, and write tests in validators.js.

This is one of my first pull requests so I am still unsure as to what do when it comes to all this. I saw the issue and it seemed like something I could do, so I tried to add a basic implementation. I hope I did not step on anyones toes by taking up this issue. If there are any issues or problems please let me know and I will get on it. Any criticisms appreciated.

Checklist

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

@codecov
Copy link

codecov bot commented Jan 28, 2022

Codecov Report

Merging #1917 (3a5f6c0) into master (f055c11) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master     #1917   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          102       103    +1     
  Lines         2072      2079    +7     
  Branches       472       473    +1     
=========================================
+ Hits          2072      2079    +7     
Impacted Files Coverage Δ
src/index.js 100.00% <100.00%> (ø)
src/lib/isPhoneNumber.js 100.00% <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 f055c11...3a5f6c0. Read the comment docs.

@WikiRik
Copy link
Member

WikiRik commented Jan 28, 2022

Back in 2013 the idea was rejected, see #167
I think the same reasoning still applies now.

Also, I don't think this really solves #1915. For that I would add Moldova to isMobilePhone like in #1846 for example

@ghost
Copy link
Author

ghost commented Jan 28, 2022

Thanks for the feedback. I will start looking into that.

@ghost ghost closed this Jan 28, 2022
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants