validator.js icon indicating copy to clipboard operation
validator.js copied to clipboard

Regex added: India(+91)

Open siddharth-sable opened this issue 3 years ago • 12 comments

Checklist

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

siddharth-sable avatar Oct 19 '21 09:10 siddharth-sable

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.

codecov[bot] avatar Oct 19 '21 09:10 codecov[bot]

Can you tell me what needs to be done now? Should I just close the PR

siddharth-sable avatar Oct 19 '21 09:10 siddharth-sable

@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!

tux-tn avatar Oct 19 '21 11:10 tux-tn

Thanks for your help and time.

siddharth-sable avatar Oct 19 '21 11:10 siddharth-sable

I added an alias for en-IN which is hi-IN, take a look.

siddharth-sable avatar Oct 25 '21 07:10 siddharth-sable

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!

tux-tn avatar Oct 26 '21 11:10 tux-tn

Why are the tests failing?

siddharth-sable avatar Jan 18 '22 12:01 siddharth-sable

The linter is failing because of the double quotes you used

WikiRik avatar Jan 18 '22 13:01 WikiRik

I not able to get where the issue is, I haven't used any double quotes though. Can you please point it out?

siddharth-sable avatar Jan 19 '22 08:01 siddharth-sable

In the isMobilePhone file, you can see the changes of this PR to find out which exact lines

WikiRik avatar Jan 19 '22 09:01 WikiRik

tests are passed. Kindly check

siddharth-sable avatar Jan 22 '22 20:01 siddharth-sable

@siddharth-sable fix the conflicts please

rubiin avatar Jul 18 '22 12:07 rubiin