Package io.avaje.validation.constraints
Annotation Interface Pattern
@Target({METHOD,FIELD,ANNOTATION_TYPE,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
@Documented
public @interface Pattern
The annotated
CharSequence must match the specified regular expression. The regular
expression follows the Java regular expression conventions see Pattern.
Accepts CharSequence. null elements are considered valid.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic @interfaceDefines severalPatternannotations on the same element. -
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
regexp
String regexpthe regular expression to match -
flags
RegexFlag[] flagsarray ofRegexFlags considered when resolving the regular expression- Default:
{}
-
message
String messagethe error message template- Default:
"{avaje.Pattern.message}"
-
groups
Class<?>[] groupsthe groups the constraint belongs to- Default:
{}
-