Quote:
3.4. Group and group sequence
...; if one of the
group process in the sequence leads to one or more validation failure, the groups following in the sequence must
not be processed.
3.5. Validation routine
...
The object validation routine is described as such. For each constraint declaration and in the previously defined order:
• execute the isValid operation (from the constraint validation implementation) on the appropriate data (see Section
2.3)
• if isValid returns true, continue to the next constraint,
• if isValid returns false, the Bean Validation provider populate an InvalidConstraint object and append it to
the list of returned values
There are use cases when we want the validation process (routine) to stop on the first violated constraint, so that we do not spent unduly time.
I think that this is the usual case - we validate some instace or graph of instances and if some constraint is violated, no matter which one we should stop ignoring the order the constraints are checked into the group.
Collecting errors is more usefull in UI wizards or something like that when you want to draw them back to the user, so that they can be corrected easily.
The current specification lacks the feature to stop the validation routine on the first violated constraint.