I´ve been reading a lot about hibernate validator and so far I haven´t found the issue, that I want to resolve. I want to validate some fields if the other attribute is equal to something for example:
@NotNull
String field1;
@NotNull
@Validate(field1 = "1")
String field2;
In this case I want to validate field2 if field1 is equal to "1"
Is it possible?