Annotation Interface Pattern


Custom implementation of Pattern that allows the annotated object to be any type. The validation occurs against the objects toString value. The regular expression follows the Java regular expression conventions see Pattern.

Accepts Any. null elements are considered valid.

Author:
Emmanuel Bernard, Matthew Keathley
  • Nested Class Summary

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

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
     
    Class<?>[]
     
     
    Class<? extends jakarta.validation.Payload>[]
     
  • Element Details

    • regexp

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

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

      String message
      Returns:
      The error message template.
      Default:
      "{co.ecg.alpaca.toolkit.validation.Pattern.message}"
    • groups

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

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