Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joi.ref doesnt works on password_confirmation #47

Open
animalinstinct opened this issue Dec 1, 2019 · 2 comments
Open

Joi.ref doesnt works on password_confirmation #47

animalinstinct opened this issue Dec 1, 2019 · 2 comments

Comments

@animalinstinct
Copy link

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
Copy link

sir If resolved? if resolved please provide solution

@jitendrarchetu
Copy link

I am also facing same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants