All Downloads are FREE. Search and download functionalities are using the official Maven repository.

br.com.caelum.stella.hibernate.validator.CPF Maven / Gradle / Ivy

There is a newer version: 1.2
Show newest version
package br.com.caelum.stella.hibernate.validator;

import org.hibernate.validator.ValidatorClass;

import java.lang.annotation.Documented;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Restrição que pode ser associada a objetos em que o método {@linkplain #toString()} 
 * represente um CPF.
 *
 * @author Fabio Kung
 * @author Leonardo Bessa
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({FIELD, METHOD})
@ValidatorClass(StellaCPFValidator.class)
public @interface CPF {
    String message() default "{cpf_invalid}";
    boolean formatted() default false;
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy