jeffbski / joi-browser

joi validation bundled for the browser (deprecated) - use joi@16+
Other
273 stars 39 forks source link

Joi.ref doesnt works on password_confirmation #47

Open AnimalInstinct opened 4 years ago

AnimalInstinct commented 4 years ago

Hi "joi-browser": "^13.4.0", "react": "^16.12.0",

trying to add validation to my registration form, got a problem with password confirmation. Valid and joi.ref doesnt works. I have tried different combinations from many different manuals, but no luck, it doesnt works.

password: Joi.string() .required() .min(8) .label("Password"), password_confirmation: Joi.any() .required() .valid(Joi.ref("password")) .options({ language: { any: { allowOnly: "!!Passwords do not match" } } })

I have checked via state, inputs are equal, but validator still count it as unequal.

jayeshmemorres commented 3 years ago

sir If resolved? if resolved please provide solution

jitendrarchetu commented 3 years ago

I am also facing same issue.