Created
October 25, 2012 16:10
-
-
Save sednem/3953715 to your computer and use it in GitHub Desktop.
Annotation ISBN
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 br.ufpe.nti.entity.beanValidation; | |
import static java.lang.annotation.ElementType.ANNOTATION_TYPE; | |
import static java.lang.annotation.ElementType.FIELD; | |
import static java.lang.annotation.ElementType.METHOD; | |
import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
import java.lang.annotation.Documented; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.Target; | |
import javax.validation.Constraint; | |
import javax.validation.Payload; | |
@Target( { METHOD, FIELD, ANNOTATION_TYPE }) | |
@Retention(RUNTIME) | |
@Constraint(validatedBy = ValidaISBN.class) | |
@Documented | |
public @interface ISBN { | |
String message() default "{validation.isbn}"; | |
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