Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to validate password and confirm password on react form 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'),
  });
 
PREVIOUS NEXT
Tagged: #validate #password #confirm #password #react #form #hook
ADD COMMENT
Topic
Name
5+1 =