org.vfdtech.annotations.ValidPhone Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of utilities-and-generic-tools Show documentation
Show all versions of utilities-and-generic-tools Show documentation
A utilities service with generic tools implementation. Can be
plugged into your java project
/*
* Copyright (c) 2022. VFD GROUP LTD
*
* team: Team Valiant
* author: Ayomide Akinrotoye
* email: [email protected]
* created: 10/25/22, 11:57 PM
*/
/**
* Created by
*
* @author Ayomide.Akinrotoye
* on Feb 21, 2022
*/
package org.vfdtech.annotations;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import org.vfdtech.validators.PhoneValidator;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Ayomide.Akinrotoye
*
*/
@Documented
@Constraint(validatedBy = PhoneValidator.class)
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface ValidPhone {
String message() default "Invalid Phone number. Nigerian Phone number should be in this format 234xxxxxxxxxx OR 0xxxxxxxxxx ";
Class>[] groups() default {};
Class extends Payload>[] payload() default {};
}