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

Memory leak with email validation in zod forms #300

Closed
callmeberzerker opened this issue Sep 18, 2023 · 3 comments
Closed

Memory leak with email validation in zod forms #300

callmeberzerker opened this issue Sep 18, 2023 · 3 comments
Labels
bug A confirmed report of unexpected behavior in the application

Comments

@callmeberzerker
Copy link

callmeberzerker commented Sep 18, 2023

Current Behavior

The browser tab hangs and crashes

Expected Behavior

Email validation works

Steps To Reproduce

  1. basically start writing in the email field with characters and browser tab will grind to a halt (enter at least 50 characters)

Link to Reproduction / Stackblitz

https://stackblitz.com/edit/github-zxmrcw?file=src%2Froutes%2F%2Bpage.svelte,src%2Froutes%2F%2Blayout.svelte

More Information

I did some testing and this only happens when validating the email constraint -> and I have no running hypothesis why is that the case.

@callmeberzerker callmeberzerker added the bug A confirmed report of unexpected behavior in the application label Sep 18, 2023
@huntabyte
Copy link
Owner

Interesting 🤔, thanks for raising this issue, I'll look into it!

@huntabyte
Copy link
Owner

Closing this as it's an issue with Zod itself, rather than shadcn-svelte or formsnap - see: colinhacks/zod#2580

You can find some example workarounds in this issue here in the meantime: colinhacks/zod#2609

@callmeberzerker
Copy link
Author

Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants