TanStackT
TanStack3mo ago
13 replies
colossal-harlequin

Nextjs serverValidate doesn't return accurate typed-values

Hello, I followed this example to setup Nextjs backend validation https://tanstack.com/form/latest/docs/framework/react/examples/next-server-actions
I'm using zodv4 for validations.
The serverValidate has objectify-ed the array and stringify-ed the numbers as you can see in the screenshots. Have I missed something in the configuration ? Should I Object.values every array and parseFloat every number resulting of the validated data ?
By the way, love this library so far and I really enjoy using it, thank you for it, keep up the very good work!
image.png
image.png
image.png
An example showing how to implement Next Server Actions in React using TanStack Form.
React TanStack Form Next Server Actions Example | TanStack Form Docs
Was this page helpful?