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
It's could be because since id is not required in the schema, when it failed validation it returned the default value for a non-required field, in this case undefined.
It's could be because since id is not required in the schema, when it failed validation it returned the default value for a non-required field, in this case undefined.
Thank for your reply. But i see your explain not show the root cause.
Could you reason why validate with '7' but not with '79'
Description
function
superValidate
return not correct data.id
was undefined as result ofsuperValidate
. Note this occurred with id = 7Schema:
It can resolve by use
parseInt
:But with id = 79, it's not happed
Can someone give me the root cause.
Thank alot
If applicable, a MRE
Use this template project to create a minimal reproducible example that you can link to here: https://sveltelab.dev/github.com/ciscoheat/superforms-examples/tree/zod (right click to open in a new tab)
The text was updated successfully, but these errors were encountered: