Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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')
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #yup #validate #password #confirmation
ADD COMMENT
Topic
Name
5+9 =