jquense / yup

Dead simple Object schema validation
MIT License
22.72k stars 925 forks source link

Validation for password confirmation does not work #2206

Open motisaa opened 4 months ago

motisaa commented 4 months ago

Describe the bug This is the code I have for Confirmpassword validation: confirmPassword: yup.string() .oneOf([yup.ref('password')], 'Passwords should match.')

But when I only type password and don't type anything in confirmPassword field,(Empty confirmPassword). I don't get the error of "Passwords should match"

Expected behavior I should get error of Password should match

Platform (please complete the following information):

doubleyooz commented 4 months ago

got the same error. I have no idea what is it

jquense commented 4 months ago

Gotta provide a Repro i can look at, that doesn't include other libraries