Skip to content

feat: add fr-FR license plate validator#2806

Open
SarthakDudhe wants to merge 1 commit into
validatorjs:masterfrom
SarthakDudhe:feat-add-france-license-plate-validator
Open

feat: add fr-FR license plate validator#2806
SarthakDudhe wants to merge 1 commit into
validatorjs:masterfrom
SarthakDudhe:feat-add-france-license-plate-validator

Conversation

@SarthakDudhe

Copy link
Copy Markdown

short description of the changes for this issue:

isLicensePlate: Added support for France (fr-FR), validating French SIV license plates (2 letters, 3 digits, 2 letters, excluding the characters I, O, and U to avoid optical confusion).
Documentation & Tests: Updated README.md to list fr-FR as a supported locale, and added unit tests in test/validators.test.js covering valid (e.g., AB-123-CD, AB123CD) and invalid (e.g., AI-123-BB, ab-123-cd) formats.

@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

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

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2806   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2587      2588    +1     
  Branches       656       656           
=========================================
+ Hits          2587      2588    +1     

☔ View full report in Codecov by Harness.
📢 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.

@tux-tn tux-tn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for your PR

The official ANTS documentation (https://immatriculation.ants.gouv.fr/tout-savoir/numero-logo-et-plaque) (In french) states that the SIV format excludes I, O, and U, and also prohibits the two-letter combination SS:

Une seule association de deux lettres est interdite, SS…

The current regex excludes I/O/U but accepts SS, for example SS-123-AA and AA-123-SS. Could you update the validator and add regression tests covering SS in both letter-pair positions?

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