validators array support #4585
Replies: 5 comments 3 replies
-
Yes this would be great (unless there's another way to use multiple |
Beta Was this translation helpful? Give feedback.
-
There is no reason to combine validators, use-form supports schema based validation which is much more advanced and readable – https://mantine.dev/form/validation/#zod |
Beta Was this translation helpful? Give feedback.
-
Actually there is a simple implementation, Quick Usage
Tree shaking
|
Beta Was this translation helpful? Give feedback.
-
Was actually trying to find this today. You provide in the library already 90% of common usage validator, I think it would be so much convenient to be ab le to just chain them so we could use only mantine validator rather then adding external library (or implementing homemade function) just because I can't show different message for "password is empty" and "password do not match regex" For now I suggest doing something like
|
Beta Was this translation helpful? Give feedback.
-
+1, I'd really like to see this type of support in forms. |
Beta Was this translation helpful? Give feedback.
-
To use multiple checks, you must use a verbose if condition:
This syntax may be more convenient:
Beta Was this translation helpful? Give feedback.
All reactions