“Yup Motword Match” Réponses codées

Yup valider la confirmation du mot de passe

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')
});
DevPedrada

Validation du mot de passe yup

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')
});
Gorgeous Goldfinch

Comment faire le mot de passe confirmer dans yup

passwordConfirm: Yup.string()
+               .label('Password Confirm')
+               .required()
+               .oneOf([Yup.ref('password')], 'Passwords does not match'),
Pleasant Pintail

Yup mot de passe confirmer le mot de passe

Yup.object({
  password: Yup.string().required('Password is required'),
  passwordConfirmation: Yup.string()
    .test('passwords-match', 'Passwords must match', function(value){
      return this.parent.password === value
    })
})
Quaint Quail

Yup Motword Match

 password: yup
    .string()
    .required("Password is required")
    .min(6, "Password must be at least 6 characters"),
  passwordConfirmation: yup
    .string()
    .required("Confirm Password is required")
    .oneOf([yup.ref("password"), null], "Passwords must match"),
Vast Vicuña

Réponses similaires à “Yup Motword Match”

Questions similaires à “Yup Motword Match”

Plus de réponses similaires à “Yup Motword Match” dans JavaScript

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code