-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
feat(isLicensePlate): updated German license plate validation #1945
feat(isLicensePlate): updated German license plate validation #1945
Conversation
Forgot to remove the old regex in my last commit
Codecov Report
@@ Coverage Diff @@
## master #1945 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 102 102
Lines 2085 2085
Branches 472 472
=========================================
Hits 2085 2085
Continue to review full report at Codecov.
|
I'd like kindly ask you to take a look at my change. Only carefully switched out the area code part of the regex so it should be safe to say it isn't breaking anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add tests for the new code as well
Sorry for disagreeing but exactly why? So why should there be more? ——— But thanks for commenting. I had another look at the regex and there is one obsolete | operator. Will fix in the next hour. |
Well the thing is since there is a code update, the new tests would ensure that the change agrees to the final output. Otherwise things would break in future. Also it would help review the code more fatser |
Okay, I agree. Better safe than sorry. Will think of a few more tests. |
Yeah thats the reason :) |
@ezkemboi Could you merge please? |
Thankyou for the contribution 🎉 |
In this PR I updated all the available area codes (https://de.wikipedia.org/wiki/Liste_der_Kfz-Kennzeichen_in_Deutschland) for Germany's license plate validation regex.
Also I decided it will be easier to update and maintain in the future if all area codes are in alphabetical order. There are no performance or speed drawbacks with alphabetical sorting.
Checklist