yup para password code example
Example: Yup password confirm password
Yup.object({
password: Yup.string().required('Password is required'),
passwordConfirmation: Yup.string()
.test('passwords-match', 'Passwords must match', function(value){
return this.parent.password === value
})
})