Skip to content
Discussion options

You must be logged in to vote

@igordanchenko : You're using TextField as a generic component without providing any context about form values to "useFormContext", that's why "errors[name].message" cannot be determined and fallback to all possible supported types.

Just put form values for your case (which is a string) to make it work.

https://codesandbox.io/s/react-hook-form-8914-forked-cuh5l2?file=/src/TextField.tsx

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@igordanchenko
Comment options

Comment options

You must be logged in to vote
3 replies
@igordanchenko
Comment options

@JasonTheAdams
Comment options

@leapful
Comment options

leapful Nov 5, 2022
Collaborator

Answer selected by igordanchenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #8914 on August 25, 2022 02:35.