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

Previously working required message, drops when combining refValueFor #153

Open
jamaybyrone opened this issue Jul 11, 2023 · 1 comment
Open

Comments

@jamaybyrone
Copy link
Contributor

Working in version 1.12.13
Config:
{ "config": { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "currentPassword": { "type": "string", "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])\\S{8,99}$" }, "newPassword": { "type": "string", "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])\\S{8,99}$" }, "confirm_password": { "type": "string", "pattern": "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])\\S{8,99}$", "refValueFor": "newPassword" } }, "required": [ "currentPassword", "newPassword", "confirm_password" ] }, "errorMessages": { "currentPassword": { "required": "Enter your current password", "pattern": "Please enter a valid password" }, "newPassword": { "required": "Enter a new password", "pattern": "Please enter a valid password" }, "confirm_password": { "required": "Enter a confirm password", "pattern": "Please enter a valid password", "refValueFor": "Confirm password field must have the same value as New password" } } }

in versions above 1.12.13 confirm_password's required message, gets dropped and the following now appears: 'confirm_password is a required field'

@kristianmandrup
Copy link
Owner

I'm sorry about that. Not currently maintaining this project much and the test suite has not been kept up to date for a while.
You're welcome to have a look into it, the latest commits and make a PR if you spot the regression. Cheers.

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

2 participants