Annotation Interface PositiveOrZero


The annotated element must be a positive number or 0.

Supported types are:

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

null elements are considered valid.

Since:
2.0
Author:
Gunnar Morling
  • Element Details

    • message

      String message
      Default:
      "{jakarta.validation.constraints.PositiveOrZero.message}"
    • groups

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

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