Conditionally prevent cascading validation
问题 Given the classes: class Foo { @Size(max = 1) @Valid private List<Bar> bars; } class Bar { @NotBlank private String snafu; } How can validation be applied that prevents Bar.snafu being validated when the Size constraint on Foo.bars failed? I though that i can achieve that with group conversion and the definition of a group sequence. but i failed configuring it the way i want. Even though it looks like, defining fail-fast is not an option. 回答1: The following solves this issue: interface