-->
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: Validator returns no more than one InvalidValue
PostPosted: Tue Aug 28, 2007 10:21 am 
Beginner
Beginner

Joined: Sat May 20, 2006 3:40 pm
Posts: 21
How do I get, when catching InvalidStateException, an array of ALL invalid values (i.e. ones that don't meet their constraints as defined by Hibernate Validator) on the object?

The array always seems to be no more than a length of 1, regardless of how many constraints are being violated. Why is this, and how do I fix it?

By the way, what determines the order in which values are added to the InvalidValue array? (In my case, what determines which single InvalidValue makes up the array?) Is it the order it's getter is specified in the class, random, or something else?

Thanks.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 28, 2007 4:01 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
If there is more than one failure, there will be more than in InvalidValue object.
You can check the unit tests to see some examples.

The order however is undefined. I expect the JSR 303 spec to partially define the order though

_________________
Emmanuel


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.