formik validate 2 password confirmation code example
Example: how to do password confirm in Yup
passwordConfirm: Yup.string()
+ .label('Password Confirm')
+ .required()
+ .oneOf([Yup.ref('password')], 'Passwords does not match'),