feat(isMobilePhone): add (en-CM) alias for Cameroon (fr-CM) mobile phone validation#2701
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2701 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 114 114
Lines 2586 2587 +1
Branches 656 656
=========================================
+ Hits 2586 2587 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@rubiin I've just added a link as reference. |
There was a problem hiding this comment.
Pull request overview
Adds support for validating Cameroon mobile phone numbers under the en-CM locale for isMobilePhone.
Changes:
- Added
en-CMlocale support by aliasing it to the existingfr-CMphone pattern. - Added
en-CMvalid/invalid test fixtures forisMobilePhone. - Updated README documentation to include
en-CMin theisMobilePhonelocale list (plus additional formatting changes).
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/lib/isMobilePhone.js |
Adds en-CM as an alias of the existing fr-CM regex. |
test/validators.test.js |
Adds en-CM test coverage with representative valid/invalid numbers. |
README.md |
Updates the documented isMobilePhone locale list to include en-CM (and reflows related markdown). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What I did
Added mobile phone validation for Anglophone Cameroon (en-CM)
to the isMobilePhone validator.
Changes
en-CMalias insrc/lib/isMobilePhone.jstest/validators.test.jsReferences
Checklist