I want to use Material-UI radio buttons, after the react-hook-form update the validation throws the following error:
transformToNestObject is not a function
Is the Controller wrapper not correct?
Sandbox example
<Controller
render={({ field, fieldState }) => (
<RadioGroup {...field} aria-label="option">
<FormControlLabel
value="A"
control={<Radio size="small" color="primary" />}
label="A"
/>
<FormControlLabel
value="B"
control={<Radio size="small" color="primary" />}
label="B"
/>
</RadioGroup>
)}
name="option"
control={control}
/>
Try upgrading @hookform/resolvers package to the latest version. Source.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With