Skip to content
Advertisement

Validation issue with javax constraint

In a spring boot application, I have an entity where I put some annotation validation.

JavaScript

Value for theses files

JavaScript

I get many error

JavaScript

Freq have one character, why i get this message? Empty value is lower then 17 for currency..

I don’t understand why this error occur.

Advertisement

Answer

The @Max annotation are validation for these types: BigDecimal, BigInteger, byte, short, int, long, and their respective wrappers.

https://docs.oracle.com/javaee/6/api/javax/validation/constraints/Max.html

Use a different annotation @Length(min, max) if you are trying to validate string length.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement