A type-safe form validation library utilizing web fundamentals to progressively enhance HTML Forms with full support for server frameworks like Remix and Next.js.
We do not know "which" property triggered the error, which property is missing and overriding the error message to better identify the source does not seem to be working.
This is specific to client-side validation, as server-side validation works.
Expected behavior :
Using Discriminated Union Types should work
Better error message, like giving away the key of the property that caused the error
Conform version
v1.1.5
Steps to Reproduce the Bug or Issue
Submit the form, either empty or with values in it.
Describe the bug and the expected behavior
When using client-side form validation with Conform, Zod and Remix with a Discriminated Union Type, I get an unclear error : "Invalid input".
Demo in this stackblitz
Here is a simple repro :
Here is an example object output of the failed validation :
We do not know "which" property triggered the error, which property is missing and overriding the error message to better identify the source does not seem to be working.
This is specific to client-side validation, as server-side validation works.
Expected behavior :
Conform version
v1.1.5
Steps to Reproduce the Bug or Issue
What browsers are you seeing the problem on?
Chrome
Screenshots or Videos
No response
Additional context
No response