Answers for "how to validate password and confirm password with yup"

1

yup validate password confirmation

import * as Yup from 'yup';

validationSchema: Yup.object({
  password: Yup.string().required('Password is required'),
  passwordConfirmation: Yup.string()
     .oneOf([Yup.ref('password'), null], 'Passwords must match')
});
Posted by: Guest on June-30-2021

Code answers related to "how to validate password and confirm password with yup"

Browse Popular Code Answers by Language