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.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Defines several Pattern annotations on the same element.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    the regular expression to match
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    array of RegexFlags considered when resolving the regular expression
    Class<?>[]
    the groups the constraint belongs to
    the error message template
  • Element Details

    • regexp

      String regexp
      the regular expression to match
    • flags

      RegexFlag[] flags
      array of RegexFlags considered when resolving the regular expression
      Default:
      {}
    • message

      String message
      the error message template
      Default:
      "{avaje.Pattern.message}"
    • groups

      Class<?>[] groups
      the groups the constraint belongs to
      Default:
      {}