Это код моей аннотации < /p>
Код: Выделить всё
@Constraint(validatedBy = ImageValidator.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.PARAMETER)
@Documented
public @interface ImageValidation {
String message() default "Download PNG or JPEG only."; **// Here is my message without a method name**
Class[] groups() default {};
Class
Подробнее здесь: [url]https://stackoverflow.com/questions/63266859/how-i-can-delete-the-unnecessary-part-of-the-error-message[/url]