Annotation Interface Validation.String.Pattern

Enclosing class:
Validation.String

@Target({METHOD,PARAMETER,ANNOTATION_TYPE,TYPE_USE,RECORD_COMPONENT}) @Constraint public static @interface Validation.String.Pattern
The value must match the given regular expression.
  • Element Details

    • message

      String message
      Message to return instead of the default one of the validator. The message can be a string format, where the first (and only) parameter will be the actual value that is being validated.
      Returns:
      message to describe the constraint validation error
      Default:
      ""
    • value

      String value
      The regular expression.
      Returns:
      regular expression to match
    • flags

      Pattern flags to use.
      Returns:
      flags to add when creating the pattern
      Default:
      {}