Package jakarta.validation.constraints
Annotation Type Pattern
-
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE}) @Retention(RUNTIME) @Repeatable(List.class) @Documented @Constraint(validatedBy={}) public @interface Pattern
The annotatedCharSequence
must match the specified regular expression. The regular expression follows the Java regular expression conventions seePattern
.Accepts
CharSequence
.null
elements are considered valid.- Author:
- Emmanuel Bernard
-
-
Required Element Summary
Required Elements Modifier and Type Required Element Description java.lang.String
regexp
-
-
-
-
flags
Pattern.Flag[] flags
- Returns:
- array of
Flag
s considered when resolving the regular expression
- Default:
- {}
-
-
-
payload
java.lang.Class<? extends Payload>[] payload
- Returns:
- the payload associated to the constraint
- Default:
- {}
-
-