Skip to content

feat(isMobilePhone): Add Senegal (fr-SN) mobile phone validation#2678

Open
nihalar wants to merge 1 commit intovalidatorjs:masterfrom
nihalar:add-senegal-mobile-phone
Open

feat(isMobilePhone): Add Senegal (fr-SN) mobile phone validation#2678
nihalar wants to merge 1 commit intovalidatorjs:masterfrom
nihalar:add-senegal-mobile-phone

Conversation

@nihalar
Copy link

@nihalar nihalar commented Mar 7, 2026

Motivation

Addresses #1761 — adds mobile phone validation for a missing country.

Changes

  • Added fr-SN locale to isMobilePhone.js for Senegal mobile numbers
    • Country code: +221
    • Mobile numbers start with 7, followed by 0/5/6/7/8, then 7 digits
  • Added tests with valid and invalid Senegalese phone numbers
  • Updated README locale list

Test

All 317 tests pass locally with 100% statement coverage.

Add phone number validation for Senegal with locale fr-SN.
Senegal mobile numbers use country code +221 and start with
7 followed by 0, 5, 6, 7, or 8.
@codecov
Copy link

codecov bot commented Mar 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (b1aea75) to head (6ade697).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2678   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2595      2595           
  Branches       659       659           
=========================================
  Hits          2595      2595           

☔ 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.

@rubiin rubiin changed the title Add Senegal (fr-SN) mobile phone validation feat(isMobilePhone): Add Senegal (fr-SN) mobile phone validation Mar 11, 2026
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.

2 participants