-
I want to use the const { setFieldValue } = useForm({
validationSchema: Yup.object({
branding: Yup.object({
name: Yup.string().required(),
})
)}
)} <!-- This is a custom component -->
<InputField id="branding.name" /> How can I do that? |
Beta Was this translation helpful? Give feedback.
Answered by
logaretm
Feb 6, 2022
Replies: 1 comment 2 replies
-
Have you tried: setFieldValue('branding.name', 'new val'); This should work as long the field is creating using |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
alex3025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Have you tried:
This should work as long the field is creating using
useField
or as long yourInputField
component calls it with its name/id. Feel free to provide a sample on codesandbox or stackblitz and I will take a look.