validator.js
validator.js copied to clipboard
Added mobile phone validations for the 10 countries.
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)
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% <ø> (ø) |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Please add the relevant test cases.
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?
I added test cases. please review my PR