Skip to content

feat: add Romanian licence plate validation - #17

Open
Aaqibhafeezkhan wants to merge 1 commit into
Robert-GeorgeDev:mainfrom
Aaqibhafeezkhan:feat/romanian-license-plate-validator
Open

Aaqibhafeezkhan wants to merge 1 commit into
Robert-GeorgeDev:mainfrom
Aaqibhafeezkhan:feat/romanian-license-plate-validator

Conversation

@Aaqibhafeezkhan

Copy link
Copy Markdown

Summary

  • Add validatePlate and isValidPlate with Romanian county-code lookup.
  • Normalize lowercase input and ignore spaces, dots, and dashes.
  • Return the normalized plate, county code, and county name in data.
  • Cover county plates, Bucharest's 2- and 3-digit forms, normalization, and invalid input with tests.
  • Update the public exports, README API examples, and Unreleased changelog.

Format source

The Romanian Government's road-traffic regulation, HG 1391/2006, Article 23, defines the registration number as the county or Bucharest indicator, a numeric serial, and three uppercase Latin letters:
https://legislatie.just.ro/Public/DetaliiDocument/264861

Closes #9.

@Aaqibhafeezkhan Aaqibhafeezkhan left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

reviewed the validator, public exports, county lookup, input normalization, and valid and invalid plate test cases.

This branch has not been deployed

No deployments
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.

Add a validator for Romanian licence plates

1 participant