Skip to content

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

Closed
ghost wants to merge 2 commits into
masterfrom
unknown repository
Closed

feat(isPhoneNumber): Add isPhoneNumber validator and tests#1917
ghost wants to merge 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Jan 28, 2022

Copy link
Copy Markdown

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

codecov Bot commented Jan 28, 2022

Copy link
Copy Markdown

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

WikiRik commented Jan 28, 2022

Copy link
Copy Markdown
Member

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

ghost commented Jan 28, 2022

Copy link
Copy Markdown
Author

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