feat(isLicensePlate): updated German license plate validation#1945
feat(isLicensePlate): updated German license plate validation#1945rubiin merged 4 commits intovalidatorjs:masterfrom
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. |
rubiin
left a comment
There was a problem hiding this comment.
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