Annotation Interface URL


@Documented @Target({FIELD,METHOD,PARAMETER,CONSTRUCTOR,TYPE_USE,ANNOTATION_TYPE}) @Retention(RUNTIME) @Repeatable(URL.List.class) @Constraint(validatedBy=io.fluxzero.sdk.tracking.handling.validation.constraints.URLValidator.class) public @interface URL
Validates that a character sequence can be parsed as a URL and optionally matches URL components.
  • Element Details

    • message

      String message
      Returns:
      violation message template
      Default:
      "must be a valid URL"
    • groups

      Class<?>[] groups
      Returns:
      validation groups for which this constraint applies
      Default:
      {}
    • payload

      Class<? extends jakarta.validation.Payload>[] payload
      Returns:
      payload metadata associated with this constraint
      Default:
      {}
    • protocol

      String protocol
      Returns:
      required URL protocol, or an empty string to allow any protocol
      Default:
      ""
    • host

      String host
      Returns:
      required URL host, or an empty string to allow any host
      Default:
      ""
    • port

      int port
      Returns:
      required URL port, or -1 to allow any port
      Default:
      -1
    • regexp

      String regexp
      Returns:
      regular expression that the original URL text must match
      Default:
      ".*"
    • flags

      jakarta.validation.constraints.Pattern.Flag[] flags
      Returns:
      pattern flags used for regexp()
      Default:
      {}