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

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

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

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.METHOD;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.hibernate.validator.ValidatorClass;

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

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy