Annotation Interface Size


@Constraint(validatedBy=SizeValidator.class) @Target(PARAMETER) @Retention(RUNTIME) public @interface Size
Size constraints
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Unique key that represents the constraints in the application.
    long
    Maximum value.
    long
    Minimum value.
  • Optional Element Summary

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

    • min

      long min
      Minimum value.
    • max

      long max
      Maximum value.
    • key

      String key
      Unique key that represents the constraints in the application.
    • message

      String message
      Constraints error message
      Default:
      "Size Constraint Violation"
    • payload

      Class<? extends jakarta.validation.Payload>[] payload
      Default:
      {}
    • groups

      Class<?>[] groups
      Default:
      {}