📅  最后修改于: 2022-03-11 14:57:26.845000             🧑  作者: Mango
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
})
})