-->
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: Conditional or Event based validation
PostPosted: Thu Sep 05, 2013 3:28 pm 
Newbie

Joined: Thu Sep 05, 2013 3:18 pm
Posts: 1
How can i perform conditional validations using JSR 303?

Say if a radio button is clicked and a field X is displayed based on the event.
If the event == true, validate the field in the bean
If the event == false, don't validate the field in the bean

I read that using spring validations, we can use applyIf annotation.
Does JSR 303 provide any annotation for this purpose?


Top
 Profile  
 
 Post subject: Re: Conditional or Event based validation
PostPosted: Mon Sep 09, 2013 4:51 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
That's hard to answer without knowing some more details. How are you triggering validation, are you invoking validation yourself via one of the methods on javax.validation.Validator? Possibly validation groups (see http://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#chapter-groups) may be useful for you.

--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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.