Skip to content

Instantly share code, notes, and snippets.

@ThakurPriyanka
Last active August 26, 2018 17:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ThakurPriyanka/9be6730f8e1d0a4b7be30f1efac4a12c to your computer and use it in GitHub Desktop.
Save ThakurPriyanka/9be6730f8e1d0a4b7be30f1efac4a12c to your computer and use it in GitHub Desktop.
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