-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Broken form validations in SolidJS? #1256
Comments
So the problem here is how SolidJS treats
As for the docs, there are 5 instances where I see this error is made, I will verify them and make a commit based on whether their usage is OK. Thank you for bringing this up! |
@theVedanta found one more issue (potentially? I've updated the example). Notice both For DX, I wouldn't expect to have to set |
I think this is a good insight! If you had a validator check it, for example You can check out this example: https://stackblitz.com/edit/solidjs-templates-g56ng1la?file=src%2FApp.tsx This has both |
@theVedanta Thanks! This should work as a workaround for me. For clarity, these two are definitely bugs within the package.
My take is that 1 should work as expected, otherwise there isn't much point offering that feature. 2 should be always disabled, otherwise the form would allow invalid submissions by default which defeats the purpose. |
|
@theVedanta 2. Why doesn't the form submit then when I click the submit button from initial state? |
Describe the bug
Hey! I am literally following the guide for validations and I am unable to accomplish a simple validation.
Your minimal, reproducible example
https://stackblitz.com/edit/solidjs-templates-bv3rc2x1?file=src%2FApp.tsx
Steps to reproduce
Expected behavior
Probably resolving the issue with validator not running would resolve the button state?
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
N/A
TanStack Form adapter
solid-form
TanStack Form version
1.0.5
TypeScript version
5.1.3
Additional context
No response
The text was updated successfully, but these errors were encountered: