У меня есть следующее пользовательское ограничение:
Код: Выделить всё
@Documented
@Retention(RUNTIME)
@Target({TYPE, RECORD_COMPONENT, PARAMETER, METHOD})
@Constraint(validatedBy = ValidAdjustmentDateValidator.class)
public @interface ValidAdjustmentDate {
String message() default "Invalid date combination";
Class[] groups() default {};
Class
Подробнее здесь: [url]https://stackoverflow.com/questions/79829392/custom-bean-validation-constraint-not-working-on-interface-default-methods[/url]
Мобильная версия