@ DecimalMax.List example?

Hey.

Can someone give a meaningful example of using @DecimalMax.List from javax.validation.constraints.* ? How can a field have several maximum limits?

Thank you very much.

+4
source share
1 answer

All package annotations have a corresponding List annotation. Even restrictions like @NotNull .

This allows you to use the same annotation for different validation groups . With @DecimalMax.List you can set one maximum for one group and another maximum for another group.

+1
source

Source: https://habr.com/ru/post/1487815/


All Articles