Код: Выделить всё
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
@Retention(RUNTIME)
@Documented
@NotNull
@Min(3)
@Size(min = 3, max = 30)
@Constraint(validatedBy = {})
public @interface Name
{
String message() default "lms.common.validation.Name.message";
Class[] groups() default {};
Class
Подробнее здесь: [url]https://stackoverflow.com/questions/79589396/jsr-303-custom-annotation-not-working-properly[/url]