Is there anything within the hibernate validation framework that allows me to access the class instance and not just the property value?
I want to validate, using a hibernate validator, if a value is unique (there is a unique constraint in the database). Example: unique username for a User class.
I can put a custom annotation on the username property, and I will get the username value in the validator, but I can't get access to the User object to see if the value has changed or the primary key of the user to see if there is already one in the database.
Is there anyway to do this?
|