Annotation Type Matches
-
@Documented @Retention(RUNTIME) @Target(FIELD) public @interface Matches
Constrains a field value to ensure it matches the provided expression.This constraint will always pass with an empty field. See
Required
to enforce a non-null value.- Since:
- 4.0.0
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String
failureMessage
Message to throw in an exception when a match fails.
-
-
-
-
failureMessage
String failureMessage
Message to throw in an exception when a match fails.This message will be formatted as a MessageFormat with two parameters:
- the input string
- the pattern being matched
- Returns:
- message format.
- Since:
- 4.0.0
- Default:
- ""
-
-