- All Implemented Interfaces and Traits:
- jakarta.validation.ConstraintValidator<NotEmptyWhenNullableConstraint, Collection>
@CompileStatic
class NotEmptyWhenNullableConstraintForCollectionValidator
extends Object
implements jakarta.validation.ConstraintValidator<NotEmptyWhenNullableConstraint, Collection>
Validates if Collection
is empty.
Null Collections
are ignored (reported as valid).
This constraint validator is very similar to the standard bean validation's NotEmpty
, but this one skips null Collections
and does not report them as violations.