Replies: 1 comment
-
Hey @gerarts, seems like a great improvement. Would you like to do a PR for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Currently all validators accept
any
(throughtype ValidatorParam = any
). Wouldn't it be better to strongly type all validator constructors?We could even add a generic to Validator like:
This would provide a better DX, and we might be able to remove some of the runtime checks (for example in string pattern), which are not implemented consistently in the current version (min- / max-string has no checks).
MinLength Validator has no runtime checks
Pattern Validator has runtime checks
Beta Was this translation helpful? Give feedback.
All reactions