Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

yup password validation

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 til.hashrocket.com #
 
PREVIOUS NEXT
Tagged: #yup #password #validation
ADD COMMENT
Topic
Name
8+5 =