ag.orbia.common.javax.annotations.AlphaNumeric.kt Maven / Gradle / Ivy
package ag.orbia.common.javax.annotations
import ag.orbia.common.javax.validators.alphanumeric.AlphaNumericValidator
import javax.validation.Constraint
import kotlin.reflect.KClass
/**
* The annotated element must be an alpha-numeric string.
*
* Valid inputs are composed of numbers, upper and lowercase characters,
* accentuated vowels (both upper and lowercase), c-cedil, spaces and
* basic symbols (.,!?-).
*
* @since 1.0.0
*/
@Target(AnnotationTarget.FIELD)
@Retention(AnnotationRetention.RUNTIME)
@Constraint(validatedBy = [AlphaNumericValidator::class])
annotation class AlphaNumeric(
val message: String = "O campo só aceita letras e números",
val acceptAccents: Boolean = true,
val groups: Array> = [],
val payload: Array> = []
)