Hi, I'm trying to create a change password form. So far everything is working, but I'm having some difficulties validating the confirm password input. I'm trying to get an error in the confirm password input if the user changes the new password input. Apparently the validateOnInputChange only works for that particular input, no the entire form...
Tried with useEffect, but it only made a loop as the only dependency that is asking me is the form itself.
initialValues: {
currentPassword: '',
newPassword: '',
confirmPassword: '',
},
validateInputOnChange: true,
validate: {
newPassword: (value) => !meetReq(value),
confirmPassword: (value, values) =>
value === values.newPassword ? null : 'invalid password',
},
});