Uh oh!
There was an error while loading. Please reload this page.
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.
|
bennetfabian
commented
Mar 25, 2022
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. |
rubiin
left a comment
There was a problem hiding this comment.
please add tests for the new code as well
bennetfabian
commented
Mar 25, 2022
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. |
rubiin
commented
Mar 25, 2022
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 |
bennetfabian
commented
Mar 25, 2022
Okay, I agree. Better safe than sorry. Will think of a few more tests. |
rubiin
commented
Mar 25, 2022
Yeah thats the reason :) |
bennetfabian
commented
Mar 25, 2022
@ezkemboi Could you merge please? |
rubiin
commented
Jul 18, 2022
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