validator.js
validator.js copied to clipboard
Regex added: India(+91)
Checklist
- [x] PR contains only changes related; no stray files, etc.
- [x] README updated (where applicable)
- [x] Tests written (where applicable)
Codecov Report
Merging #1805 (cc2b621) into master (1bb14e8) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #1805 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 104 104
Lines 2203 2204 +1
Branches 477 477
=========================================
+ Hits 2203 2204 +1
Impacted Files | Coverage Δ | |
---|---|---|
src/lib/isMobilePhone.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 1bb14e8...cc2b621. Read the comment docs.
Can you tell me what needs to be done now? Should I just close the PR
@sid4618 Since hi-IN
is also a valid locale for india i suggest you make an alias and add tests and an entry to readme file. An example can be found here.
Thank you!
Thanks for your help and time.
I added an alias for en-IN which is hi-IN, take a look.
That's not what i meant by adding an alias, just add this below the phones object:
phones['hi-IN'] = phones['en-IN'];
That way we have only on regex to maintain if the mobile phones system is updated in India. Thank you!
Why are the tests failing?
The linter is failing because of the double quotes you used
I not able to get where the issue is, I haven't used any double quotes though. Can you please point it out?
In the isMobilePhone file, you can see the changes of this PR to find out which exact lines
tests are passed. Kindly check
@siddharth-sable fix the conflicts please