type error when using yup object schema fields #863
Send to my agentDescribe the bug#
When adding validators to the useForm it still doesn't populate the field error. I found a PR for that exactly.
But I have a type error when using "Schema.fields.field" on the validation. I have to use "Schema.fields.field as AnySchema" for it to work.
Your minimal, reproducible example#
Steps to reproduce#
Just look at the editor
Expected behavior#
It should work without using "as AnySchema".
How often does this bug happen?#
Every time
Screenshots or Videos#
No response
Platform#
- MacOS (irrelevant)
TanStack Form adapter#
react-form
TanStack Form version#
0.26.4
TypeScript version#
latest
Additional context#
No response
crutchcorn(GitHub profile, opens in a new tab) added labelstype: bug
crutchcorn(GitHub profile, opens in a new tab) added labelshelp wanted
Yup has been temporarily removed until they support Standard Schema, so this is no longer a problem.
crutchcorn(GitHub profile, opens in a new tab) closed this
Sign in to join this conversation.
This is a TS bug for sure, but I dunno how to fix it. I don't know Yup's types well enough to know what's accepted or not. PRs welcome