-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
[solidjs] Conditional validation #231
Comments
I think you forgot to call the signal. You wrote |
Hello again Fabian, thanks for your help. And sorry for being this late. I've fixed the code as you suggested, yet during submit it does not validate. I've reproduced here https://stackblitz.com/edit/solidjs-templates-ofa5sg Thanks again |
I have investigated this issue. The problem seems to be that every validation is optional by default. This means that our You are basically hitting an edge case that our system is not compatible with. A workaround might be to use a Valibot schema to validate your form instead. |
Ok that make sense. Thanks again! |
For me, it would also be useful to have a conditional required validation. I'm currently running a validator without using the custom function ( Could an extra function, something like |
I recommend that you add it yourself, as Valibot currently takes up most of my time. |
Hey all again.
I was wondering if it is possible to specify a validator, like
required
, in a conditional way, i.e. from a signal.I've played with the
custom
validator,But when submitting it does not show any error.
Any suggestion is really appreciated.
The text was updated successfully, but these errors were encountered: