Annotation Interface Negative


The annotated element must be a strictly negative 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
Author:
Gunnar Morling
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Defines several Negative 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:
      "{jakarta.validation.constraints.Negative.message}"
    • groups

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

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