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