Last active
April 30, 2019 09:43
-
-
Save bhawna94/3602a354126561a32f535509e4064711 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.validation.Constraint; | |
import javax.validation.Payload; | |
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}) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Constraint(validatedBy = FutureAndWithinSevenDaysValidator.class) | |
public @interface FutureAndWithinSevenDays { | |
String message() default "The date should be future or within the seven days period."; | |
Class<?>[] groups() default {}; | |
Class<? extends Payload>[] payload() default {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment