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

org.vfdtech.annotations.ValidPhone Maven / Gradle / Ivy

Go to download

A utilities service with generic tools implementation. Can be plugged into your java project

There is a newer version: 0.3.5
Show newest version
/*
 * 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[] payload() default {};
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy