Skip to content
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

Svelte 5 field error validation does not trigger after a valid submission #1619

Closed
ArsalaanAnsariDeveloper opened this issue Jan 13, 2025 · 2 comments

Comments

@ArsalaanAnsariDeveloper

Describe the bug

It seems that the submission behavior for the final component on https://next.shadcn-svelte.com/docs/components/form is a little erratic. If you look at the video, it correctly shows the field errors and toast message on the first submission with an empty username. However, after subsequent invalid submissions, it stops working.

The Svelte 4 example https://www.shadcn-svelte.com/docs/components/form always shows field errors on invalid submits and always shows the toast message, which I think is the ideal behavior. I am experiencing this behavior in my personal project as well.

Svelte 5 erratic behavior:

Svelte.5.Erratic.Behavior.mov

Svelte 4 ideal behavior:

Svelte.4.Ideal.Behavior.mov

Reproduction

Last component on https://next.shadcn-svelte.com/docs/components/form

Logs

No response

System Info

Arc Browser

Severity

annoyance

@ArsalaanAnsariDeveloper
Copy link
Author

ArsalaanAnsariDeveloper commented Jan 13, 2025

Hey I was able to track down the issue! Seems to be something that was an issue on the svelte-kit side:

ciscoheat/sveltekit-superforms#536
sveltejs/kit#13205

Upgrading to 2.15.2 seems to do the trick.

"@sveltejs/kit": "^2.15.2",

@huntabyte
Copy link
Owner

Awesome to hear!

Will close this then!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants