Skip to content

feat(isMobilePhone): add (en-CM) alias for Cameroon (fr-CM) mobile phone validation#2701

Merged
rubiin merged 6 commits intovalidatorjs:masterfrom
JossGeek:feat/isMobilePhone-en-CM
Apr 24, 2026
Merged

feat(isMobilePhone): add (en-CM) alias for Cameroon (fr-CM) mobile phone validation#2701
rubiin merged 6 commits intovalidatorjs:masterfrom
JossGeek:feat/isMobilePhone-en-CM

Conversation

@JossGeek
Copy link
Copy Markdown
Contributor

@JossGeek JossGeek commented Apr 23, 2026

What I did

Added mobile phone validation for Anglophone Cameroon (en-CM)
to the isMobilePhone validator.

Changes

  • Added en-CM alias in src/lib/isMobilePhone.js
  • Added valid and invalid test cases in test/validators.test.js

References

Checklist

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (e36b279) to head (e714c5c).
⚠️ Report is 1 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@rubiin rubiin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reference should be a link

@JossGeek
Copy link
Copy Markdown
Contributor Author

JossGeek commented Apr 23, 2026

@rubiin I've just added a link as reference.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for validating Cameroon mobile phone numbers under the en-CM locale for isMobilePhone.

Changes:

  • Added en-CM locale support by aliasing it to the existing fr-CM phone pattern.
  • Added en-CM valid/invalid test fixtures for isMobilePhone.
  • Updated README documentation to include en-CM in the isMobilePhone locale 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.

Comment thread src/lib/isMobilePhone.js
Comment thread README.md Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@JossGeek JossGeek changed the title feat(isMobilePhone): add Cameroon (en-CM) mobile phone validation feat(isMobilePhone): add (en-CM) alias for Cameroon (fr-CM) mobile phone validation Apr 23, 2026
@rubiin rubiin requested a review from Copilot April 24, 2026 07:40
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md
Comment thread README.md Outdated
rubiin
rubiin previously approved these changes Apr 24, 2026
Comment thread README.md
@rubiin rubiin self-requested a review April 24, 2026 18:38
@rubiin rubiin merged commit 7fdc788 into validatorjs:master Apr 24, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants