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

[#660] Make DependentRequired error message more helpful #661

Conversation

bernie-schelberg-mywave
Copy link
Contributor

As described in issue #660, the error message for dependentRequired validations dumps out all dependentRequired rules, which is not helpful if there are many. It's not clear which particular rule has been violated. This PR changes the error message from something like

has a missing property which is dependent required {optional=[requiredWhenOptionalPresent], otherOptional=[otherDependentRequired]}

to a more useful

has a missing property "requiredWhenOptionalPresent" which is dependent required because "optional" is present"

@stevehu stevehu merged commit b888a00 into networknt:master Feb 15, 2023
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

Successfully merging this pull request may close these issues.

None yet

2 participants