Created
November 3, 2021 11:36
-
-
Save alexchirea/eaaba57d262c4730ef31f8f724d7b0ad 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
@Documented | |
@Constraint(validatedBy = CustomGoogleEmailValidator.class) | |
@Target({ ElementType.METHOD, ElementType.FIELD }) | |
@Retention(RetentionPolicy.RUNTIME) | |
public @interface CustomGoogleEmailConstraint { | |
String message() default "The email must have \"@gmail.com\" extension"; | |
Class[] groups() default {}; | |
Class[] payload() default {}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment