title: Validate Collection using JSR 303
body: <p>I want to validate array of beans using JSR 303 Validation. Like <a href="http://docs.jboss.org/hibernate/validator/4.2/reference/en-US/html_single/#d0e416" rel="nofollow">spec</a> says, it's possible to validate the whole collection.
  if I had object like this</p>
  
  <pre><code>public class Car {
    @NotNull
    @Valid
    private List&lt;Person&gt; passengers = new ArrayList&lt;Person&gt;();
  }
  </code></pre>
  
  <p>so I would be able to validate list of passengers by doing following:</p>
  
  <pre><code>Car car = ....
  Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
  Set&lt;ConstraintViolation&lt;Car&gt;&gt; validation = validator.validate(car);
  </code></pre>
  
  <p>But I wondering, why can't I validate list of passengers by doing following:</p>
  
  <pre><code>Validator validator = Validation.buildDefaultValidatorFactory().getValidator();
  Set&lt;ConstraintViolation&lt;List&lt;Person&gt;&gt;&gt; validation =validator.validate(passengers);
  </code></pre>
  
  <p>It just doesn't work! Can anybody give me any explanations on that?</p>