Is there an implementation of (or third-party implementation for) cross field validation in Hibernate Validator 4.x? If not, what is the cleanest way to implement a cross fi
I don't have the reputation for commenting on the first answer but wanted to add that I have added unit tests for the winning answer and have the following observations:
@FieldMatch(first="invalidFieldName1", second="validFieldName2")
private String stringField = "1";
private Integer integerField = new Integer(1)
private int intField = 1;