title: Java Bean Validation: GroupSequence with Class-Level Constraint
body: <p>I have a bean class with multiple (custom) inner constraints and one class-level constraint. I'd like to validate the inner constraints before the class-level constraint. The code looks like this:</p>
  
  <pre><code>@GroupSequence({ Inner.class, NewSlotBean.class })
  @TotalBeanValid(groups = NewSlotBean.class)
  public class NewSlotBean {
  
      @DayMonthYearString(groups = Inner.class)
      private String slotDay;
  
      @TimeString(groups = Inner.class)
      private String slotBegin;
  
      @LengthString(groups = Inner.class)
      private String slotLength;
  }
  </code></pre>
  
  <p>(<code>Inner</code> is just an empty interface lying around somewhere).</p>
  
  <p>However, when I try to run this, the class-level constraint does not get validated at all. When I try to define the GroupSequence like</p>
  
  <pre><code>@GroupSequence({ Inner.class, Outer.class })
  </code></pre>
  
  <p>(with <code>Outer</code> being a random interface), I get the exception: </p>
  
  <pre><code>javax.validation.GroupDefinitionException: ...*.beans.NewSlotBean must be part of the redefined default group sequence.
  </code></pre>
  
  <p>Does s/o know how to make sure that the class-level constraint is validated after the inner ones? (This appears not to be the default! I've had random problems with it popping up after a while.)</p>