How can I Hibernate
validate a property that may also be empty? And more important: only validate IF the property is not empty, otherwise SKIP the validation?
private int age;
@AssertTrue(condition = "age != null") //something like this
boolean isAgeValid() {
return age >= 0;
}
Is there any possibility?