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
Thanks for your kind help.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: Struts2 Annotations validate String using RegexFieldValidator