I have made a mistace introducing isLicensePlate().
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
Thanks for raising this. I would be happy to take on this issue and help deprecate or rework the isLicensePlate validator. Let me know if I can proceed .
The proper way for these kinds of things will be to deprecate first, so that projects that are currently using them will have time for migration , and not to break any pipelines. The removal can be done in the next major version
I think it really depends on which locale you use to validate the plate. Some are accurate for a longer time. But I understand that the current validator might need more regular updates than most of the project. We also only have 13 supported locales, which is relatively low, and it's purely a RegEx check. I'm fine with deprecating this validator soon and removing it in a future major version