package com.qianwen.smartman.common.validator.phone; 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; import javax.validation.Constraint; import javax.validation.Payload; @Target({ElementType.FIELD, ElementType.PARAMETER}) @Constraint(validatedBy = {PhoneValueValidator.class}) @Documented @Retention(RetentionPolicy.RUNTIME) public @interface PhoneValue { @Target({ElementType.FIELD, ElementType.PARAMETER}) @Retention(RetentionPolicy.RUNTIME) @Documented public @interface List { PhoneValue[] value(); } String message() default "手机号码格式不正确"; Class[] groups() default {}; Class[] payload() default {}; boolean required() default true; }