-->
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: Query on constraint-mapping in hibernate-validator
PostPosted: Mon Jun 16, 2014 7:48 am 
Newbie

Joined: Tue Feb 04, 2014 7:17 am
Posts: 4
Hi,

In the “validation-configuration-1.0.xsd” I see in

https://docs.jboss.org/hibernate/validator/4.0.1/reference/en/html/validator-xmlconfiguration.html

I notice that there could be 0..n number of constraint mapping - so that means I can add more than one <constraint-mapping> , right?

Also is it possible to refer a constraint-mapping file outside the jar file?

Currently my validation.xml is under: src\main\resources\META-INF\validation.xml
and my constraint-mapping is referred as follows

<constraint-mapping xmlns="http://jboss.org/xml/ns/javax/validation/configuration">/META-INF/validation/Test-user.xml</constraint-mapping>


Is it possible to refer the constraint-mapping file from outside the project/jar file?


Top
 Profile  
 
 Post subject: Re: Query on constraint-mapping in hibernate-validator
PostPosted: Wed Jun 18, 2014 3:44 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Quote:
I notice that there could be 0..n number of constraint mapping - so that means I can add more than one <constraint-mapping> , right?


Yes, you can have more than one mapping file.

Quote:
Also is it possible to refer a constraint-mapping file outside the jar file?


This should be possible as well; The specified files are looked up on the classpath, no matter which JAR they are in.

Hth,

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


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.