0 points

Check The Password Confirmation With Yup - Today I Learned


dashboard

Fri Nov 06 2020 05:01:28 GMT+0000 (UTC)

Posted by @devandapaige #javascript #react.js #yup

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')
});
content_copy Copy

https://til.hashrocket.com/posts/vahuw4phan-check-the-password-confirmation-with-yup