Annotation Interface Pattern


The annotated CharSequence must match the specified regular expression. The regular expression follows the Java regular expression conventions see Pattern.

Accepts CharSequence. null elements are considered valid.

Author:
Emmanuel Bernard
  • Element Details

    • regexp Link icon

      String regexp
      Returns:
      the regular expression to match
    • flags Link icon

      Pattern.Flag[] flags
      Returns:
      array of Flags considered when resolving the regular expression
      Default:
      {}
    • message Link icon

      String message
      Returns:
      the error message template
      Default:
      "{jakarta.validation.constraints.Pattern.message}"
    • groups Link icon

      Class<?>[] groups
      Returns:
      the groups the constraint belongs to
      Default:
      {}
    • payload Link icon

      Class<? extends Payload>[] payload
      Returns:
      the payload associated to the constraint
      Default:
      {}