Have you tried placing @Valid onto field or getter of MyObj?
I already tried @Valid.
I did some debugging and found the root cause of the problem. In my real application my field is a private one and starts with an underscore. I put the annotation on this field directly. But my getter was named without this underscore (_text vs. getText()) and the validator implementation performs an equals() on those two names (getText() will be used as text). So _text != text and no validation will be performed... Good to know but in the end it's a logic process. How should the implementation know that getText() is returning _text.^^
So at all others that stumble over this thread looking for an answer: Always annotate the getters or name the annotated variables the same as the getters
Now all I have to do is to find out, why I don't get the error message. But that might be a wrong config. Thanks anyway Hardy
Glad you found the answer :-)