-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Description
A few years back, I introduced the "isLicensePlate"-validator to this project. In retroperspective, I have to admit that this was a mistake.
License plate formats change. Unfortunately, quite often. A good example is the german license plate format, which I implemented. Since my implementation, a lot of changes have been made, a lot of new district codes have been added. Also, a lot of special plates (government, etc.) are not implemented. I have to assume that for every other locale, there are currently license plate numbers that would be rejected by the validator.
In my eyes, there is no reasonable way to make sure that this cannot happen. In the current form, this feature creates frustration for users, as this validator is overly strict. The only way to solve this would be to check against a very broad and generic alphanumeric string with maybe 10-11 max characters, but narrowing the check down further than that will eventually create the problem I described.
Idk how to continue with that, but maybe this check must be discontinued or marked as deprecated or something like that. If you have better suggestions, I am happy to help