When you say you've checked the Hibernate Validators sources and think it should work
properly, are you sure you are looking at the version you are actually using? In JBoss
4.2.1, I had to installer newer hibernate jars in order to get a working @Email validator
as detailed here:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=115318
Also, be aware that if you don't mark a field "required" on the input
control, JSF will not submit a blank/empty text field for validation. Hibernate, however,
will check for non-nullness, etc. when you do an update or persist, and this can cause an
exception at persist time. So you need to be very careful to keep your validator
annotations compatible with "required" (or non-required) input controls. I find
this aspect of JSF (non)validation to be very error prone and wish it could be fixed, but
it seems to be entrenched in the JSF lifecycle design, so we are forced to work around
it.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4075911#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...