I'm using "revalidate" to validate "redux-form" forms, but I'm facing this situation where there's a form that is generated dynamically based on an API response that I map over it and display the inputs inside the form.
Here's an example of how I normally validate "redux forms" with "revalidate ...
const validate = combineValidators({
name: composeValidators(
isRequired({ message: "Please enter your full name." }),
hasLengthLessThan(255)({
message: "Name can't exceed 255 characters."
})
)(),
email: composeValidators(
isRequired({ message: "Please enter your e-mail address." }),
matchesPattern(IS_EMAIL)({
message: "Please enter a valid e-mail address."
})
)()
});
export default compose(
connect(
null,
actions
),
reduxForm({ form: "signupForm", enableReinitialize: true, validate })
)(SignUpForm);
Now, how I go about doing a similar thing with the auto-generated forms?