dengzedong
2024-12-24 aa0382e44311f9f7e62a688c8fcaa9c69a512e0f
提交 | 用户 | 时间
e7c126 1 package com.iailab.framework.common.validation;
H 2
3 import javax.validation.Constraint;
4 import javax.validation.Payload;
5 import java.lang.annotation.*;
6
7 @Target({
8         ElementType.METHOD,
9         ElementType.FIELD,
10         ElementType.ANNOTATION_TYPE,
11         ElementType.CONSTRUCTOR,
12         ElementType.PARAMETER,
13         ElementType.TYPE_USE
14 })
15 @Retention(RetentionPolicy.RUNTIME)
16 @Documented
17 @Constraint(
18         validatedBy = TelephoneValidator.class
19 )
20 public @interface Telephone {
21
22     String message() default "电话格式不正确";
23
24     Class<?>[] groups() default {};
25
26     Class<? extends Payload>[] payload() default {};
27
28 }