-->
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.  [ 3 posts ] 
Author Message
 Post subject: Multiple Validation messages?
PostPosted: Tue Nov 30, 2010 2:55 pm 
Newbie

Joined: Tue Nov 30, 2010 2:48 pm
Posts: 4
Sorry, I have tried to find something about this in the forum, but have been unable to do so. However, I cannot believe I am the first to have it.

I have several class-level annotations that apply to a number of properties (@EqualTo.List({ ... }), for instance). However, when the errors return, there is always only a single error message for each annotation type, no matter how many fields are actually invalid (so I have a number of @EqualTo and @NotNull [mine, not the default] properties, but only one EqualTo message appears and only one NotNull message appears, each applying to only a single property, even though several properties are in fact null or not equal).

Is this because the system automatically short-circuits when a single validation of a given type fails? Can this be overridden?

Thanks in advance for all replies!

David Sills


Top
 Profile  
 
 Post subject: Re: Multiple Validation messages?
PostPosted: Wed Dec 01, 2010 6:31 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
There should be one error per failing constraint unless you are using group sequences. Hard to tell what exactly your problem is without seeing the annotated classes. Could you post them?

--Hardy


Top
 Profile  
 
 Post subject: Re: Multiple Validation messages?
PostPosted: Wed Dec 01, 2010 7:06 am 
Newbie

Joined: Tue Nov 30, 2010 2:48 pm
Posts: 4
Many thanks for your trouble in answering, but looking at it with fresh eyes I just noticed that the problem had nothing to do with the validation. Again, thanks and best holiday wishes!

David Sills


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.