Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to set the validation condition to "strictly greater than"?

I would like to know instead of the Hibernate validator @Min which is inclusive (equal or greater than) is there a way to express "strictly greater than" a number?

Thanks very much :)

like image 243
wceo Avatar asked Dec 20 '22 23:12

wceo


1 Answers

If you work with Bean Validation 1.1 (part of Java EE 7) you may use @DecimalMin instead which has an additional attribute, inclusive, which controls whether "strictly greater than" or "greater than or equals to" semantics are used.

like image 64
Gunnar Avatar answered Dec 28 '22 14:12

Gunnar