Luís Alves (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *commented* on BVAL-240 (
https://hibernate.atlassian.net/browse/BVAL-240?atlOrigin=eyJpIjoiY2VlNWQ...
)
Re: Revisit cross field validation (
https://hibernate.atlassian.net/browse/BVAL-240?atlOrigin=eyJpIjoiY2VlNWQ...
)
I think would be enough if ConstraintValidatorContext could provide a reference for the
object the field belongs to. Then the BV custom implementation can decide what to do with
it. For example with Spring we could use SpEL and do validation on a field that uses
information from another field or fields on the bean. The current solution with class
level validation works, but you lose the the actual path of the validated field that can
be inside a list and should have a proper index. On Vivian Steller example if b as a list
of Integers if you had 10 items and only 2 failed the validation you cannot tell which
ones were with class level validation, if I’m not mistaken.
(
https://hibernate.atlassian.net/browse/BVAL-240#add-comment?atlOrigin=eyJ...
) Add Comment (
https://hibernate.atlassian.net/browse/BVAL-240#add-comment?atlOrigin=eyJ...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100206- sha1:1c596f6 )