-->
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: Dynamic Grouping of Validatons
PostPosted: Fri Nov 18, 2011 8:48 am 
Newbie

Joined: Thu Nov 17, 2011 2:05 am
Posts: 3
Hi,

Hibernate validators allows to configure add the validations to a specific group using annotations.

@AssertTrue(message = "The car has to pass the vehicle inspection first", groups = CarChecks.class)
private boolean passedVehicleInspection;

Can you please tell me if I can do the same parametrically? I have a list of custom validators. I want to select some of these validations and add them to the specific group dynamically.


Thanks,
Pratik


Top
 Profile  
 
 Post subject: Re: Dynamic Grouping of Validatons
PostPosted: Sat Nov 19, 2011 8:25 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi,

I'm not sure whether I fully get what you're trying to achieve, but maybe the programmatic constraint API of HV might be helpful for you. You can use it to declare constraints for given types programmatically at runtime.

--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.