ag.orbia.common.javax.annotations.Phone.kt Maven / Gradle / Ivy
package ag.orbia.common.javax.annotations
import ag.orbia.common.javax.validators.phone.PhoneValidator
import javax.validation.Constraint
import kotlin.reflect.KClass
/**
* The annotated element must be a valid whether a date is correctly formatted.
*
* @since 1.0.14
*/
@Target(AnnotationTarget.FIELD)
@Retention(AnnotationRetention.RUNTIME)
@Constraint(validatedBy = [PhoneValidator::class])
annotation class Phone (
val pattern: String = "\\+\\d{2,3} \\d{2,4} \\d{4,5}-\\d{4}",
val message: String = "O formato do telefone de contato está incorreto",
val groups: Array> = [],
val payload: Array> = []
)