Skip to content

feat: add Haiti (ht-HT) support to isIdentityCard and isMobilePhone#2699

Open
Oskie5802 wants to merge 1 commit intovalidatorjs:masterfrom
Oskie5802:feat/add-haiti-ht-HT-locale
Open

feat: add Haiti (ht-HT) support to isIdentityCard and isMobilePhone#2699
Oskie5802 wants to merge 1 commit intovalidatorjs:masterfrom
Oskie5802:feat/add-haiti-ht-HT-locale

Conversation

@Oskie5802
Copy link
Copy Markdown

@Oskie5802 Oskie5802 commented Apr 17, 2026

Summary

Fixes #2656

  • isIdentityCard: added ht-HT locale for Haiti's CIN (Carte d'Identité Nationale) - format: 1 letter followed by 10 digits (e.g. A1234567890)
  • isMobilePhone: added ht-HT locale for Haiti mobile numbers - format: optional +509 country code + 8 digits starting with 2, 3, or 4
  • Added test fixtures for both validators

Test plan

  • isIdentityCard('A1234567890', 'ht-HT')true
  • isIdentityCard('12345678901', 'ht-HT')false (no letter prefix)
  • isMobilePhone('+50923456789', 'ht-HT')true
  • isMobilePhone('+50951234567', 'ht-HT')false (invalid prefix)
  • All 318 existing tests still pass

🤖 Generated with Claude Code

Closes validatorjs#2656

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2699   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2586      2590    +4     
  Branches       656       656           
=========================================
+ Hits          2586      2590    +4     

☔ 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 requested review from WikiRik and Copilot and removed request for Copilot April 17, 2026 18:47
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.

feat: add Haiti (ht-HT) support to isIdentityCard

1 participant