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
In an attempt to reduce the need for separate files in Next.js projects I was looking forward to write a helper defining a server action that also exposes the schema so that its definition can be inlined/colocated in the action definition. This doesn't work unfortunately as Conform's validation seemingly attempts to access the custom property or does something unexpected with the passed schema causing errors.
TypeError: undefined is not an object (evaluating 'type._def')
Enter some invalid email and move to the next field and notice how the error appears
What browsers are you seeing the problem on?
Chrome, Safari
Screenshots or Videos
No response
Additional context
You can check my latest commit adding my intended helper and how I'm referencing the schema: ChristianIvicevic@b1242ea
It's noticeable that it's triggered by Conform as the error gets delayed when you change the validation strategy to onSubmit. My gut feeling is that Conform attempts to manipulate or access the passed schema in a way that's not compatible with it being part of the action.
The text was updated successfully, but these errors were encountered:
Describe the bug and the expected behavior
In an attempt to reduce the need for separate files in Next.js projects I was looking forward to write a helper defining a server action that also exposes the schema so that its definition can be inlined/colocated in the action definition. This doesn't work unfortunately as Conform's validation seemingly attempts to access the custom property or does something unexpected with the passed schema causing errors.
Conform version
v1.2.2
Steps to Reproduce the Bug or Issue
What browsers are you seeing the problem on?
Chrome, Safari
Screenshots or Videos
No response
Additional context
You can check my latest commit adding my intended helper and how I'm referencing the schema: ChristianIvicevic@b1242ea
It's noticeable that it's triggered by Conform as the error gets delayed when you change the validation strategy to
onSubmit
. My gut feeling is that Conform attempts to manipulate or access the passed schema in a way that's not compatible with it being part of the action.The text was updated successfully, but these errors were encountered: