我正在尝试实现来自react-hook-forms for react-select的react-select,但为了做到这一点,我需要使用来自react-hook-forms的Controller,但是当我使用我的react-select component代码import Select from 'react-select';
impo
根据react-hook-form的文档,我可以像这样使用输入元素的名称"xxx.yyy“,这将导致我准备的数据是 { xxx: { yyy: value }} 但是,当我尝试使用这个带有“错误”的功能时,我无法使用它。Documentation说我应该使用这个链运算符?,所以我试了一下: {errors?.xxx?.yyy && <span>This field is required</span>} 但是,如果省略了必需的输
我使用react-hook-form的控制器组件调用material自动完成。当我传递defaultValue参数时,它在字段中填充,但单击submit按钮,然后显示验证错误消息:
shared_with_users must be a `array` type, but我使用yup进行表单验证。提前谢谢你