[jboss-user] [JBoss Seam] - Re: How to validate currency/float precision on a form

jfrankman do-not-reply at jboss.com
Tue Oct 9 18:27:04 EDT 2007


In case someone else needs to do this:

At first I downloaded the hibernate-validator.jar and tried to add it to my project and jboss, but I could not get it to work with the correct version of the hibernate-entity manager. So, I downloaded the hibernate entity manager 3.3.1 which included the latest hibernate validator and all supporting jar files. This worked much better. Deploy the hibernate entity manager jar and all the jars in the lib directory as one unit. It is much easier than downloading the validator and trying to find all the other jars that need updated to work with it. I moved the jar files from the entity manager 3.3.1 download and added them to jboss and to my project. I also had to download the core hibernate 3.2 and add the hibernate3.jar.

Once I did this I was able to get the scale and precision to work as follows:

	@Column(name = "CHECKAMOUNT", precision=7, scale=2)
  | 	@Digits(integerDigits=7,fractionalDigits=2)
  | 	public Double getCheckamount() {
  | 		return this.checkamount;
  | 	}



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093224#4093224

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093224



More information about the jboss-user mailing list