This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Maybe is it compulsory to use javax.persistence package in order @VisitorFieldValidator to work? I bet it isn't.
I have tried some more tests but @RegexFieldValidator doesn't work properly .
It sets the String (in account.phone or in phone2) but it doesn't use the Regex to validate it, so this annotation is not working for me.
However, @RequiredStringValidator works perfectly for both fields. If I don't write anything, the error message appears!
I suppose I have to validate the phone number in another way...maybe with @IntRangeFieldValidator