Last active
August 26, 2018 17:38
-
-
Save ThakurPriyanka/9be6730f8e1d0a4b7be30f1efac4a12c 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
package com.knoldus.user.annotation; | |
import javax.validation.Constraint; | |
import javax.validation.Payload; | |
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 = PasswordValidation.class) | |
public @interface Password { | |
Class<?>[] groups() default {}; | |
String message() default "the password must be 10 character long and must include the 1 numeric digit."; | |
Class<? extends Payload>[] payload() default {}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment