I am writing one model class in spring mvc. I want to do domain validation.
In domain class I have 3 variables say isABCApplicable,abcValue1,abcValue2:
private Boolean isABCApplicable;
private BigDecimal abcValue1;
private BigDecimal abcValue2;
.......getters and setters.........
Now my aim is :
If isABCApplicable is true then i want to make abcValue1 as
@NotNull
abcValue1
and
@NotNull
abcValue2
Is there any way to achieve this?