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

Provide access to unwrapped value for ConstraintViolation on container method argument or return value #194

Open
rstoyanchev opened this issue Dec 21, 2023 · 0 comments

Comments

@rstoyanchev
Copy link

rstoyanchev commented Dec 21, 2023

For method validation on arguments or return values that are containers, it would be useful to have access to the unwrapped value. For lists, arrays, and maps it is possible to get the containerIndex or containerKey from the next Path.Node and use that to get the value, but there is nothing for Iterable and other containers.

ConstraintViolation exposes part of the object graph through rootBean and leafBean. Perhaps Path.Node could provide access to the unwrapped value associated with that part of the property path, but there may be other ways.

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

1 participant