io.afu.validator.Annimation.ChineseMobile Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of validator Show documentation
Show all versions of validator Show documentation
RffanLAB Validator For Many Way use
package io.afu.validator.Annimation;
import io.afu.validator.Constant.MsgConstant;
import io.afu.validator.Implement.ChineseIdCardValidatorImpl;
import io.afu.validator.Implement.ChineseMobileValidatorImpl;
import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.ANNOTATION_TYPE,ElementType.FIELD,ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = {ChineseMobileValidatorImpl.class})
public @interface ChineseMobile {
// 中国手机号码的验证
String message() default MsgConstant.ILLEGAL_MOBILE;
Class>[] groups() default {};
Class extends Payload>[] payload() default{};
boolean allowEmpty() default false;
}