bean-validationhibernate-validatorjavax.validation

hibernate validator: validate 2 fields match


I was wondering, am I overlooking something or does the hibernate validator offer no annotation to verify that 2 fields are equal (such as a password). I know I can write my own validators, but well this seems like standard functionality.


Solution

  • Just went for the custom validator route. The other 2 answers here aren't really related to the question. With a bit of googling I found a fieldmatch example.