mirror of https://github.com/qiurunze123/miaosha
20 lines
585 B
Java
20 lines
585 B
Java
package com.geekq.common.validator;
|
|
|
|
import javax.validation.Constraint;
|
|
import javax.validation.Payload;
|
|
import java.lang.annotation.*;
|
|
|
|
@Target({ElementType.METHOD, ElementType.FIELD, ElementType.ANNOTATION_TYPE, ElementType.CONSTRUCTOR, ElementType.PARAMETER})
|
|
@Retention(RetentionPolicy.RUNTIME)
|
|
@Documented
|
|
@Constraint(validatedBy = {MobileValidator.class})
|
|
public @interface MobileCheck {
|
|
boolean required() default true ;
|
|
|
|
String message() default "手机号码格式有误!";
|
|
|
|
Class<?>[] groups() default {};
|
|
|
|
Class<? extends Payload>[] payload() default {};
|
|
}
|