I use JSF 2.0, hibernate-validator4.2.jar validation-api.jar tomcat and Eclipse.
I put @Size(min=3, message=\"xxx\")
annotation in a @ManagedBean and
It should work perfectly fine, although the empty @Size
and likes.
But I don't think that removing the tag will solve this particular exception. Your problem lies thus deeper. This validator is supposed to be auto-registered on startup. However, the exception basically tells that the validator is not registered at all. With the information given so far, it's not possible to give a targeted answer. I can think of the following possible causes:
faces-config.xml
root declaration is not declared conform JSF 2.x. Fix it.