Is it possible to validate a collection of objects in JSR 303 - Jave Bean Validation where the collection itself does not have any annotations but the elements contained wit
You, can also add @NotEmpty to the collection.
@NotEmpty
public class Car { @NotEmpty(message="At least one passenger is required") @Valid private List passengers = new ArrayList(); }
this will ensure at least one passenger is present, and the @Valid annotation ensures that each Person object is validated
@Valid
Person