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

Added mobile phone validations for the 10 countries.

Open amansaurabh opened this issue 1 year ago • 4 comments

feat(phone-validations): added validations for Croatia, Swaziland, Basque, Laos, Macedonia, Saint Vincent and the Grenadines, Grenada, Botswana, Palau, Tonga

Added phone number validations for multiple countries

This PR includes validations for phone numbers in Croatia, Swaziland, Basque, Laos, Macedonia, Saint Vincent and the Grenadines, Grenada, Botswana, Palau, and Tonga.

Enhanced #1761

Checklist

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

amansaurabh avatar Oct 02 '23 12:10 amansaurabh

Codecov Report

All modified lines are covered by tests :white_check_mark:

Comparison is base (b958bd7) 99.95% compared to head (6a12aef) 99.95%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2302      +/-   ##
==========================================
- Coverage   99.95%   99.95%   -0.01%     
==========================================
  Files         107      107              
  Lines        2454     2449       -5     
  Branches      619      619              
==========================================
- Hits         2453     2448       -5     
  Partials        1        1              
Files Coverage Δ
src/lib/isMobilePhone.js 100.00% <ø> (ø)

... and 3 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 02 '23 12:10 codecov[bot]

Please add the relevant test cases.

Daniyal-Qureshi avatar Oct 02 '23 17:10 Daniyal-Qureshi

Please add the relevant test cases. I'm new to writing tests and could use some guidance on where and how to add them. Could you please help me in the right direction or provide some examples of what a good test case looks like in this context?

amansaurabh avatar Oct 02 '23 18:10 amansaurabh

I added test cases. please review my PR

amansaurabh avatar Oct 03 '23 14:10 amansaurabh