无法访问组件内部的验证道具-Redux表单

时间:2020-07-30 04:51:59

标签: reactjs redux-form

我想访问自定义组件中的验证道具,

这是我的组成部分

<Field name="firstName" validate={[ required() ]} label="First Name" component={MyCustomComponent} />

MyCustomComponent.jsx

function MyCustomComponent(props){

 const isRequired = props.validate

return(<div>  <span>*<span> ....  </div>)


}

无法访问mycustom组件中的验证道具。

0 个答案:

没有答案