-
1. Re: Modifying Hibernate validator msgs
patrick_ibg Feb 10, 2006 8:39 PM (in response to trippccn)On #2, use a @Length (min = 1) validator.
-
2. Re: Modifying Hibernate validator msgs
epbernard Feb 11, 2006 8:39 AM (in response to trippccn)Hi,
For #1, read theHibernate Annotations reference documentation, chapter 3.1.3
Basically you can create a ValidatorMessages.properties or ValidatorMessages_fr.properties and put it in your classpath root
patrick is right @Length will be faster than a regexp -
3. Re: Modifying Hibernate validator msgs
trippccn Feb 11, 2006 10:51 AM (in response to trippccn)
Hey guys thanks for your replies.
Cool I'll use length instead. The only reason I didn't do that was so that I wouldn't have to override the length message which I feel should be diff from an empty value... no biggie.
Ya I read the hibernate docs, and it seems simple, but I couldn't get the ValidatorMessages.properties to work. They were in my classpath at compile time, is there anything else I need to do? The docs don't give any examples.
Thanks again,
Chad -
4. Re: Modifying Hibernate validator msgs
ohadpinchevsky Mar 20, 2006 11:12 AM (in response to trippccn)"TrippCCN" wrote:
Hey guys thanks for your replies.
Cool I'll use length instead. The only reason I didn't do that was so that I wouldn't have to override the length message which I feel should be diff from an empty value... no biggie.
Ya I read the hibernate docs, and it seems simple, but I couldn't get the ValidatorMessages.properties to work. They were in my classpath at compile time, is there anything else I need to do? The docs don't give any examples.
Thanks again,
Chad
Hi Chad.
I have the same problem with ValidatorMessages.properties, did you find out what it was?
10x,
Ohad -
5. Re: Modifying Hibernate validator msgs
dahm Mar 24, 2006 8:13 AM (in response to trippccn)Hi,
I had the same problems using my ValidatorMessages.properties
I put it in anywhere in my JAR and EJB3 archives, but it didn't work.
It seems to be a classloader problem. If you modify the
DefaultValidatorMessages.properties file in the hibernate-annotations.jar
in the ejb3.deployer folder it works. Yet this is ugly and not feasible
for deployment.
As a quick workaround I put my ValidatorMessages.properties in
separate JAR and copied that into the ejb3.deploy folder. However,
you'll have to restart the server.
I guess this needs to be fixed by the Hibernate guys...?
Cheers
Markus
P.S. I'm using SEAM -
6. Re: Modifying Hibernate validator msgs
epbernard Mar 25, 2006 8:59 AM (in response to trippccn)I did have a bug regarding the way ValidatorMessages was loaded. This will be fixed in the next release.
-
7. Re: Modifying Hibernate validator msgs
jcelano Nov 30, 2007 9:17 AM (in response to trippccn)has this been fixed? I am noticing the same issue using Seam 2.0 GA with Jboss 4.2
-
8. Re: Modifying Hibernate validator msgs
pmuir Nov 30, 2007 9:37 AM (in response to trippccn)Yes. Start a new topic with your issue.