I have a command class named Parent as follows:
public class Parent {
private List<Child> childList;
// getters and setters
}
And a Child class according to
public class Child {
@NotBlank
private String name;
@NotBlank
private String email;
@NotBlank
private Integer age;
}
In Spring validation module, i have been notice a @Cascade annotation.
Question: Does it work in collection-based property as in childList property ? If so, how can i use it ?
regards,
With Hibernate Validator 4.0.0 Beta2, you can.
It based on JSR-303 Bean Validation.
Annotate Your List with @Valid to validate the content of the List
Now validate: