#Modular form with zod schema validation not working when the schema is in a different file.

3 messages · Page 1 of 1 (latest)

stoic nexus
#

It seems like defining the zod schema in a different file than the form causes the validation to fail somehow. However when I copy/paste the zod schema in the same file the form is, everything seems to be working fine. It's very strange... Has anyone ever encountered that kind of problem ?

stoic nexus
#

I think the problem is because the zod schema is in a file where I import a supabase browser client instance and I’m having cross-fetch errors (as mentioned in this post others had the same kind of error using supabase-auth-helpers-qwik : https://discord.com/channels/842438759945601056/1125269525550604338) so I will try the fix I found on that post and retry.

Discord

Discord is the easiest way to communicate over voice, video, and text. Chat, hang out, and stay close with your friends and communities.

stoic nexus
#

The problem was exactly that. Removing the supabaseBrowserClient worked.