Someone is faced with the need to have a restriction that applies only when all group offers are satisfied. In other words, for
@NotNull(groups= {Group1.class, Group2.class}) private Integer value;
An invalid restriction applies when any group is valid.
What if I want to apply a restriction when both groups are valid?
Having a custom group is not an option, as there are many combinations of such groups in my application.
source share