Annotation Type PackageURL


@Target(FIELD) @Retention(RUNTIME) @Constraint(validatedBy=PackageURLConstraintValidator.class) public @interface PackageURL
Annotation that can be applied to a String field within a class. The PackageURL annotation instructs the JSR-303 compliant validator to validate the field to ensure it meets the Package URL specification.
Since:
1.3.0
  • Optional Element Summary

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

    • message

      String message
      Default:
      "The Package URL (purl) must be a valid URI and conform to https://github.com/package-url/purl-spec"
    • groups

      Class<?>[] groups
      Default:
      {}
    • payload

      Class<? extends javax.validation.Payload>[] payload
      Default:
      {}