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

com.fengwenyi.apistarter.constraints.Phone Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
package com.fengwenyi.apistarter.constraints;

import com.fengwenyi.apistarter.validator.PhoneValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.*;

import static java.lang.annotation.ElementType.*;

/**
 * @author Erwin Feng
 * @since 2021-08-09
 */
@Constraint(validatedBy = {PhoneValidator.class})
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER})
public @interface Phone {

    String message() default "手机号码格式错误";

    Class[] groups() default {};

    Class[] payload() default {};
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy