There are several typical cases for this including: Verifying a password, checking validity of a date range, etc. There are several proposed solutions, but they all involve either a large amount of code, or are not repeatable. For example:
http://stackoverflow.com/questions/1972 ... or-jsr-303Rather than having to build annotations on top of the class, I would love support for something like:
public class SignupForm{
@NotNull
String password;
@NotNull
@Confirms(confirm="password")
String passwordConfirmation;
}
Weather as a builtin, or given the ability to construct our own - this would be extremely handy!