conform does strict validation inspite of `schema.passthrough()`
Describe the bug and the expected behavior
I have the following schema:
const schema = z.object({
email: z.string().email(),
message: z.string(),
});
But my FormData contains the following fields:
{"email": "[email protected]","message":"msg1","honeypot":"val"}
It seems like conform does strict validation on the schema. Ideally, I would like it to ignore the fields that are not in the schema. Instead i get honeypot: expected never: got string.
Would it be possible to add an option to parseWithZod to support non strict schemas?
Conform version
v1.2.2
Steps to Reproduce the Bug or Issue
As described above.
What browsers are you seeing the problem on?
No response
Screenshots or Videos
No response
Additional context
No response
Hi, I also notice this. In previous versions this wasn't the default behaviour. It is expected to be this the new behaviour or is a bug in the newer versions?
Thanks and regards
In previous versions this wasn't the default behaviour.
Interesting. I don't think there is any changes made on our side for a while. I wonder if this is a change on the zod side. Which zod version are you using?