-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: MessageBundle in Hibernate Validator
PostPosted: Tue Nov 24, 2009 9:59 am 
Newbie

Joined: Fri Aug 15, 2008 3:33 am
Posts: 17
Hi,

I want to use the Hibernate Validator. It works nice but I have a problem and it seems that there is no solution in the internet.
When I have the MessageBundles direct in the source root folder then it works. But I want to put this messages in a package, e.g. org.test.myapp.
How should I write in my message?

Thank you in advance


Top
 Profile  
 
 Post subject: Re: MessageBundle in Hibernate Validator
PostPosted: Wed Nov 25, 2009 7:43 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

for now your best bet is to write your own MessageInterpolator and configure it at Validator bootstrap time using for example javax.validation.Configuration.
Have a look at ResourceBundleMessageInterpolator.
CustomMessageInterpolatorTest Shows examples on how to configure the custom interpolator using either the Configuration or ValidatorContext.

There are two open jira issues which might be relevant as well: HV-251 and HV-238.

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.