zod with post mutation stucks on a field
Hi,
I finished building my form for now and on submit I can log all data properly.
Now I tried to add a post mutation, so basically after clicking on submitting a post request shall be send which creates something. I also added zod for validation.
Right now if I click on submit the page scroll to a specific field in this case the date input field without any error, not sure what I am missing here in my validation.
This is my setup
3 Replies
I guess if it automatically scrolls to a field clicking on submit the field has validation errors? But how can I log those specific validation errors, there are currently no logs in the dev console after submitting
Even if I set these fields to nullish the page still focuses on the date element on submit
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
ok thanks for the info going to check that out
hmm errors does not return anything even if I change the type from date() to string() I get the same behavior
settings it to string works I think but need to find a better solution maybe transforming the string to a date before, but thanks for the help