-
-
Notifications
You must be signed in to change notification settings - Fork 210
Open
Labels
bug 🔥Something isn't workingSomething isn't working
Description
Description
I'm using a @hey-api/transformers
to transform dates, together with Valibot validation, all without issues.
However, when I tried to use the same validation schema in TanStack Form (https://tanstack.com/form/v1/docs/framework/react/guides/validation#validation-through-schema-libraries) it fails since the actual object in the form (transformed by heyapi) are proper Date
, and the Valibot schema expects it to be a string (pre transform).
Not sure if this is expected behavior and the generated schemas aren't meant to be used in form validation like this? One solution could be to have the schema use a union
check with both string and Date?
Related: #2103
Reproducible example or configuration
https://stackblitz.com/edit/hey-api-client-fetch-example
OpenAPI specification (optional)
No response
System information (optional)
No response
mrlubos
Metadata
Metadata
Assignees
Labels
bug 🔥Something isn't workingSomething isn't working