Skip to content

feat(isLicensePlate): Updated isLicensePlate to accept real pt-PT license plates. #2555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

castrosu
Copy link

I have updated the isLicensePlate pt-PT regex to accept actual valid license plates in Portugal.

Image as an example of valid license plates.
image

Copy link

codecov bot commented Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (d91af4b) to head (8c87bca).

Additional details and impacted files
@@            Coverage Diff            @@
##            master     #2555   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          114       114           
  Lines         2535      2535           
  Branches       641       641           
=========================================
  Hits          2535      2535           

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

@WikiRik
Copy link
Member

WikiRik commented Apr 19, 2025

Can you provide a link to the source where you made the screenshot from?

@castrosu
Copy link
Author

Can you provide a link to the source where you made the screenshot from?

Of course, here you go https://aran.pt/pt/matriculas-por-ano

'AB 12 CD',
'AA1234',
'12AA34',
'1234AA',
'AB12CD',
],
invalid: [
Copy link
Member

Choose a reason for hiding this comment

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

Can you add some more invalids here? I can imagine that we will try to simplify the regular expression in the future and we want to make sure we do not accidentally validate license plates like; 00-AA-AA, AA-AA-AA, 00-00-00 etc

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, all invalids done for now

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.

3 participants