You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it stands right now, the Zod resolver appears to be completely one way. Meaning, transform()s etc that are put in the schema don't actually affect the formState. I always assumed this wasn't the case, and wrote a lot of front/back end variations for schemas to handle things like empty string -> null, trim/lowercase strings, etc.
Judging by this issue this is not the case for all resolvers, and this comment from @bluebill1049
it's a limitation then
leads me to believe this is not necessarily something that will always remain this way. Is it safe to assume this won't change and build on it? Or if it will change, will there be an option to opt in/out of the then implemented 2 way behaviour?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
As it stands right now, the Zod resolver appears to be completely one way. Meaning,
transform()
s etc that are put in the schema don't actually affect the formState. I always assumed this wasn't the case, and wrote a lot of front/back end variations for schemas to handle things like empty string -> null, trim/lowercase strings, etc.Judging by this issue this is not the case for all resolvers, and this comment from @bluebill1049
leads me to believe this is not necessarily something that will always remain this way. Is it safe to assume this won't change and build on it? Or if it will change, will there be an option to opt in/out of the then implemented 2 way behaviour?
Beta Was this translation helpful? Give feedback.
All reactions