-->
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: What happend to Validator change for HV-5?
PostPosted: Wed May 21, 2008 2:04 pm 
Newbie

Joined: Fri Sep 15, 2006 10:18 am
Posts: 8
According to JIRA HV-5 (http://opensource.atlassian.com/projects/hibernate/browse/HV-5) there was a patch applied and committed that defined a method of specifying multiple validation rules at the class level:

Code:
import org.hibernate.validator.ValidatorList;

@ValidatorList({
  @GenericValidator(validatorClass=AfterValidator.class, parameters = { @Parameter(name="property",value="endDate"), @Parameter(name="after",value="startDate")}, message = "endDate must be after startDate"),
  @GenericValidator(validatorClass=AfterValidator.class, parameters = { @Parameter(name="property",value="firstPayment"), @Parameter(name="after",value="startDate")}, message = "firstPayment must be after startDate"),
})
public class Loan {
  ...
}


I was expecting this to be part of the 3.0.0.GA release but I cannot find the discussed classes anywhere either in the current release of Validator or in SVN. Unfortunately the SVN history doesn't go far enough back to see what happened to the code.

Could anybody shed some light on this? I was looking to use this method to specify cross field validation for a class.

Best Regards,

Chris.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 03, 2008 5:06 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Provided that @GenericValidator is a constraint annotation
Any annotation containing an array of GenericValdidator in it's value() parameter will be picked up.
I thin hte ref doc explains that and gives an example

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