Skip to content

Instantly share code, notes, and snippets.

@filipemacedo
Last active July 6, 2021 16:43
Show Gist options
  • Save filipemacedo/e90e9aa952f118c2ba083d5cfd763796 to your computer and use it in GitHub Desktop.
Save filipemacedo/e90e9aa952f118c2ba083d5cfd763796 to your computer and use it in GitHub Desktop.
Yup.object({
password: Yup.string().required('Password is required'),
passwordConfirmation: Yup.string()
.required('Confirmation is required')
.test('match', 'Passwords must match', function(value) {
return this.parent.password === value
})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment