@Retention(RUNTIME) @Target(FIELD) public @interface Pattern
An annotation that indicates that an options raw values must match a given regular expression
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Provides a description describing the intent of the regular expression, this is often more helpful to end users than an error that their input did not match a regular expression when they may not understand regular expressions
    int
    The flags for the regular expression
    The regular expression that must be matched
  • Element Details

    • pattern

      String pattern
      The regular expression that must be matched
      Returns:
      Pattern
      Default:
      ".*"
    • flags

      int flags
      The flags for the regular expression
      Returns:
      Flags
      Default:
      0
    • description

      String description
      Provides a description describing the intent of the regular expression, this is often more helpful to end users than an error that their input did not match a regular expression when they may not understand regular expressions
      Returns:
      Description
      Default:
      ""