Snippets Collections
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')
});
star

Fri Nov 06 2020 05:01:28 GMT+0000 (UTC) https://til.hashrocket.com/posts/vahuw4phan-check-the-password-confirmation-with-yup

#javascript #react.js #yup

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension