Take a look at the answer in my question here. He should do exactly what you want.
Is it possible to change the property path in the ConstraintValidator argument for a method?
If you copy my code and run it through the debugger, you will see that it is evaluated only once for each method for which it is used. Then, during the normal operation of your application, the names will not be resolved again.
robert_difalco Mar 22 '14 at 1:23 2014-03-22 01:23
source share