Annotation Interface Pattern
Validates that a string field matches a regular expression pattern.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueThe regex pattern to match.- Returns:
- the pattern
-
-
-
flags
int flagsPattern flags (fromPattern).- Returns:
- the flags
- Default:
- 0
-
message
String messageThe error message.- Returns:
- the message
- Default:
- "Value must match pattern: {value}"
-
suggestion
String suggestionAn optional suggestion shown after the error message describing how to fix it. Empty by default (no suggestion). When set, supports the same{...}placeholders asmessage().- Returns:
- the suggestion template, or empty for none
- Default:
- ""
-