Closed jramiroz98 closed 8 months ago
Having the same issue, I managed to get rid of this error by calling await on superValidate in the load function (not sure how wise this is). But now the form data is not sent on submission.
Hey,
Pretty sure with the recent changes to SvelteKit2, top-level promises are no longer awaited so you have to do it yourself.
What @wa-hab suggested seems right. You can even check from Superforms that this is how it's now done.
But now the form data is not send on submission.
I haven't found the time to migrate to SK2 myself, so I'm not sure about this. Might test once I get time.
But now the form data is not sent on submission.
nvm, this was a skill issue on my end.
Has this issue resolved itself?
Yep, all steps in the official docs + calling await on superValidate in the load function should resolve this. The docs for the Form component could be updated to reflect this though.
Anyone having trouble with client side validation? I can't reproduce my issue in a StackBlitz. If I copy the docs 1 for 1 only changing the await, it seems that I always get the validation error String must contain at least 2 character(s)
Anyone having trouble with client side validation? I can't reproduce my issue in a StackBlitz. If I copy the docs 1 for 1 only changing the await, it seems that I always get the validation error
String must contain at least 2 character(s)
Same here with constraints min() and max().
Anyone having trouble with client side validation? I can't reproduce my issue in a StackBlitz. If I copy the docs 1 for 1 only changing the await, it seems that I always get the validation error
String must contain at least 2 character(s)
I got same issues on sveltekit and sveltekit with svelte5
when schema not have .min()
its will work fine
We aren't supporting Svelte 5 yet, so any issues related to it will be closed until it reaches a stable version.
Current Behavior
I implement forms exactly as they are shown in the website and get the following error:
Form data sent directly to superForm instead of through superValidate. No initial data validation is made. Also, no constraints will exist for the form. Set the warnings.noValidationAndConstraints option to false to disable this warning.
Expected Behavior
Input field and submit button should be displayed, but instead I get error 500
Steps To Reproduce
Link to Reproduction / Stackblitz (reproduction template)
No response
More Information
It kind of worked once, reloaded and never again worked