Is it possible to access a field value, where field name is described in annotation which annotate another field in class.
For example:
@Entity
publi
You either need to write a class level constraint in which you get the full User instance passed into the isValid call or you can use something like @ScriptAssert.
At the moment it is not possible to access the root bean instance as part of a "normal" field validation. There is a BVAL issue - BVAL-237 - which discusses to add this functionality, but so far it is not yet part of the Bean Validation specification.
Note, there are good reasons why the root bean is not accessible atm. Constraints which rely on the root bean being accessible will fail for the validateValue case.