Open timonmasberg opened 2 years ago
You are doing it wrong. According to docs it shohuld be;
validate: validator({ schema }),
You are doing it wrong. According to docs it shohuld be;
validate: validator({ schema }),
Have a closer look:
OR use the validateSchema function directly in the validate option of createForm. (No need to extend Felte).
https://github.com/pablo-abc/felte/tree/main/packages/validator-zod
Your example is not listed there.
My example is listed on that same Readme. The Readme is probably outdated, if you check the migration guide of felte you will see that the suggested method is the deprecated one
El lun., 25 jul. 2022 16:19, Timon @.***> escribió:
You are doing it wrong. According to docs it shohuld be;
validate: validator({ schema }),
Have a closer look:
OR use the validateSchema function directly in the validate option of createForm. (No need to extend Felte).
https://github.com/pablo-abc/felte/tree/main/packages/validator-zod
Your example is not listed there.
— Reply to this email directly, view it on GitHub https://github.com/pablo-abc/felte/issues/161#issuecomment-1194112011, or unsubscribe https://github.com/notifications/unsubscribe-auth/AARKJWJQUG2WXPOL6K6B6VTVV2O6LANCNFSM53YQCWJA . You are receiving this because you commented.Message ID: @.***>
Describe the bug
validateSchema(schema)
andvalidator(schema)
will report a type error with the schema being anZodObject
:Which package/s are you using?
@felte/validator-zod
Environment
Version:
To reproduce
Small reproduction example
No response
Screenshots
No response
Additional context
No response