When I want to validate a record as a field of another record which implements With interface, the javax.validation.ConstraintDeclarationException is thrown.
Repro:
@RecordBuilder
public record Request(
@NotNull
@Valid
Part part)
implements RequestBuilder.With {
public record Part(@NotBlank String name) {}
}
Error message:
HV000131: A method return value must not be marked for cascaded validation more than once in a class hierarchy, but the following two methods are marked as such: Request#part(), With#part().
When I want to validate a record as a field of another record which implements
With
interface, thejavax.validation.ConstraintDeclarationException
is thrown.Repro:
Error message:
It works without
With
.