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

ag.orbia.common.javax.annotations.CpfOrCnpj.kt Maven / Gradle / Ivy

package ag.orbia.common.javax.annotations

import ag.orbia.common.javax.validators.cpfOrCnpj.CpfOrCnpjValidator
import javax.validation.Constraint
import kotlin.reflect.KClass

/**
 * The annotated element must be a valid CPF or CNPJ.
 *
 * It ignores the formatting of the string. It only validates the CPF/CNPJ numbers.
 *
 * @since 1.0.0
 */
@Target(AnnotationTarget.FIELD)
@Retention(AnnotationRetention.RUNTIME)
@Constraint(validatedBy = [CpfOrCnpjValidator::class])
annotation class CpfOrCnpj(
	val message: String = "Este documento não é um CPF ou CNPJ válido",
	val groups: Array> = [],
	val payload: Array> = []
)




© 2015 - 2024 Weber Informatics LLC | Privacy Policy