Annotation Interface Positive


The annotated element must be a strictly positive number (i.e. 0 is considered as an invalid value).

Supported types are:

  • BigDecimal
  • BigInteger
  • byte, short, int, long, float, double and their respective wrappers

null elements are considered valid.

Since:
2.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Defines several Positive constraints on the same element.
  • Optional Element Summary

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

    • message

      String message
      Default:
      "{javax.validation.constraints.Positive.message}"
    • groups

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

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