const formOption = {
config = [
{
label: 'Password',
name: 'password',
type: 'password',
rules: yup.string().required()
},
{
label: 'Confirm password',
name: 'confirmpass',
type: 'password',
rules: yup.string().required()
}
]
}
How to validate the password also the confirm password when its not equal using the react hook and yup?
cause what I'm trying to do is to add a validation when the confirm password is not equal to the password.