-
@Documented @Retention(SOURCE) @Target({FIELD,METHOD,PARAMETER}) @ConstraintRule(supportedTypes=java.lang.String.class, validatorClass=PatternConstraintValidator.class) @SelfDocumented @ReadMore(caption="What is regular expressions?", link="https://www.regular-expressions.info/") public @interface Pattern
The annotatedStringmust match the specified regular expression. The regular expression follows the Java regular expression conventions seePattern.- Since:
- 0.1
- Author:
- nedis
- See Also:
Pattern,PatternConstraintValidator
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description Pattern.Flag[]flagsReturns the array ofFlags considered when resolving the regular expression.booleanoffAllows disabling the validation rule if this rule is inherited from super class.
-
-
-
Element Detail
-
regexp
String regexp
Returns the regular expression to match.- Returns:
- the regular expression to match
-
-
-
flags
Pattern.Flag[] flags
Returns the array ofFlags considered when resolving the regular expression.- Returns:
- the array of
Flags considered when resolving the regular expression
- Default:
- {}
-
-