cara memvalidasi kata sandi dan konfirmasi kata sandi pada react bentuk hook

const validationSchema = yup.object().shape({
    newPassword: yup.string()
      .required('New Password is required'),
    confirmPassword: yup.string()
      .required('Confirm Password is required')
      .oneOf([yup.ref('password'), null], 'Passwords does not match'),
  });
Brave Beetle