-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[Validator] feature coordinates validator #61313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 7.4
Are you sure you want to change the base?
Conversation
zairigimad
commented
Aug 3, 2025
Q | A |
---|---|
Branch? | 7.4 |
Bug fix? | no |
New feature? | yes |
Deprecations? | no |
Issues | #61312 |
License | MIT |
7b62e33
to
09fed9d
Compare
It seems weird to validate a numeric input using a regex. Functionally those constraints are |
You're right that using Range makes sense for numeric validation — and we can use it to enforce geographic bounds. However, here’s why we combine it with a regex. |
It also supports numeric strings, so it seems that it would solve all your use-cases? |
I don't know if I'm in favor of this. I get the usage, but should we add new constraints every time we have a new format to validate without further validation besides a regex matching? This could be done with Also on a side note: translations are added to the lowest maintained branch to ease maintainers work (and avoid conflicting IDs on upmerge). So if this one gets merged, it should be done in a separate PR. |
true the Regex handle it, but we need to use the same regex everywhere in the code.i did this proposal to avoid duplication and for a better DX , readability ... |
I still don’t understand why we’d want to validate a numeric input using a regex? |