On 5 janv. 2012, at 11:59, Hardy Ferentschik wrote:
We are talking about two things here, right?
1. That the validation of composed constraints should stop immediately if
@ReportAsSingleViolation is specified and the first failing constraints has occurred.
That's BVAL-259
BVAL-220 is an extension of BVAL-259 which makes the behavior configurable via
something like this @ReportAsSingleViolation(shortCircuit=true)
The spec currently keeps the behavior open by saying (page 11, 2.3 Constraint
composition):
"If a composing constraint fails and if the composed constraint is marked as
@ReportAsSingleViolation, the Bean Validation provider is free to not process the other
composing
constraints for this composed constraint."
Yes though I don't think shortCircuit=true is even required, we should make it the one
and only use case (assuming we have a working solution for boolean composition). Does any
of you can think of a use case for forcing constraints to run when unnecessary?