feat(isLicensePlate): add support for Swedish license plates#1665
feat(isLicensePlate): add support for Swedish license plates#1665profnandaa merged 6 commits intovalidatorjs:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1665 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 102 102
Lines 2072 2073 +1
Branches 472 472
=========================================
+ Hits 2072 2073 +1
Continue to review full report at Codecov.
|
profnandaa
left a comment
There was a problem hiding this comment.
LGTM. Please fix the merge conflict and we should be good to go.
|
@profnandaa Fixed the merge conflict |
There was a problem hiding this comment.
Hello @elmaxe and thank you for your PR. Can you please check my comments below?
In addition to that i have two more general feedbacks:
- Multiple white-spaces are considered a valid license plate. You should probably trim your string before passing it to the regex validation in order to prevent that.
- According to the wikipedia page of swedish license plates, a plate can't end with the
Ocharacter to prevent it from being confused with0, i don't see that exception in your regex, am i wrong?
Fair!
Interestingly this is not on the Swedish wikipedia page, but it is correct (source) |
tux-tn
left a comment
There was a problem hiding this comment.
LGTM 🎉 Thank you for taking the time to address my comments
This PR adds support for Swedish license plates.
Checklist