com.nls.validation.LocalDateFormat Maven / Gradle / Ivy
The newest version!
package com.nls.validation;
import javax.validation.Constraint;
import javax.validation.Payload;
import javax.validation.ReportAsSingleViolation;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = LocalDateFormatValidator.class)
@ReportAsSingleViolation
public @interface LocalDateFormat {
String message() default "Format is invalid, format should be yyyy-mm-dd";
Class>[] groups() default {};
Class extends Payload>[] payload() default {};
boolean trim() default true;
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@interface List {
LocalDateFormat[] value();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy