javascript - Using a ReactJS prop as the validator in Redux Form -
how tell react take constraints prop passed tologinform parent?
export default reduxform({ form: 'loginform', validate: formvalidator(constraints) })(loginform) in above working code, constraints not declared outside of react components.
validate can passed form prop instead of reduxform config. you'd pass when instantiate:
<loginform validate={formvalidator(constraints)} />
Comments
Post a Comment