Hello,

I tried to setup custom messages for the hibernate validation annotation but 
without success yet.

I have a ValidatorMessages.properties (defining all the default message for 
hibernate validators) file in my ear file so that I don't get an exception at 
server startup.
All my properties file are under WEB-INF/classes in the war file.
In compoments.xml, I define all these files and everything works fine except 
validations still return the default "Validation Error" message.

I also tried to define the following in the faces-config.xml:

                <message-bundle>ValidatorMessages</message-bundle> 
  |             
  |             <locale-config>
  |                     <default-locale>en</default-locale>
  |                     <supported-locale>en</supported-locale>
  |                     <supported-locale>fr</supported-locale>
  |             </locale-config>
  | 
But it didn't change anything...

I tried to use both syntax:


  | @NotNull(message="{validator.my.message}")
  |      and 
  | @NotNull(message="#{messages['validator.my.message']}")
  | 

Without much success.

Does anyone know how to set this up? I'm sure I must have missed something 
somewhere, but I can't see what.

Thanks,

Richard 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3988629#3988629

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3988629
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to