22 lines
672 B
Java
22 lines
672 B
Java
package com.example.mtusi_messenger.web;
|
|
|
|
import jakarta.validation.Constraint;
|
|
import jakarta.validation.Payload;
|
|
|
|
import java.lang.annotation.Documented;
|
|
import java.lang.annotation.Retention;
|
|
import java.lang.annotation.Target;
|
|
|
|
import static java.lang.annotation.ElementType.*;
|
|
import static java.lang.annotation.RetentionPolicy.RUNTIME;
|
|
|
|
@Documented
|
|
@Constraint(validatedBy = UnicodeBlankValidator.class)
|
|
@Target({ FIELD, PARAMETER, RECORD_COMPONENT, ANNOTATION_TYPE })
|
|
@Retention(RUNTIME)
|
|
public @interface NotUnicodeBlank {
|
|
String message() default "must not be blank";
|
|
Class<?>[] groups() default {};
|
|
Class<? extends Payload>[] payload() default {};
|
|
}
|