@Target(value={METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(value=RUNTIME) @Repeatable(value=NotEmptyPattern.List.class) @Documented @Constraint(validatedBy={}) public @interface NotEmptyPattern
跟 javax.validation.constraints.Pattern 的区别在于: 本类校验时,传递过来的参数为null或者""时,不会校验正则表达式
public abstract String regexp
public abstract NotEmptyPattern.Flag[] flags
Flags considered when resolving the regular expressionpublic abstract String message
public abstract Class<?>[] groups
public abstract Class<? extends javax.validation.Payload>[] payload
Copyright © 2021. All rights reserved.