Package jakarta.validation.constraints
Annotation Interface Negative
@Target({METHOD,FIELD,ANNOTATION_TYPE,CONSTRUCTOR,PARAMETER,TYPE_USE})
@Retention(RUNTIME)
@Repeatable(List.class)
@Documented
@Constraint(validatedBy={})
public @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
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Defines severalNegative
constraints on the same element. -
Optional Element Summary