@Documented @Repeatable(value: NotBlankWhenNullableConstraintList) @Target(value: [FIELD, METHOD, PARAMETER, TYPE_USE, ANNOTATION_TYPE]) @Retention(value: RUNTIME) @jakarta.validation.Constraint(validatedBy: []) @interface NotBlankWhenNullableConstraint
The annotated element must must contain at least one non-whitespace character when it is not null.
Accepts onlyString
types. Message interpolation key is org.klokwrk.lib.lo.validation.constraint.NotBlankWhenNullableConstraint.message
.
This constraint is very similar to the bean validation's NotBlank
, but this one skips null values and does not report them as violations.