-->
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.  [ 1 post ] 
Author Message
 Post subject: @DecimalMin(0) but excluding 0
PostPosted: Tue Sep 15, 2009 9:21 am 
Newbie

Joined: Thu Sep 10, 2009 4:30 am
Posts: 3
Hi, I believe there's no way to use @DecimalMin constraint to specify validation rule on decimal field where the specified min value is actually excluded. What I mean is a constraint like this:
Code:
@DecimalMin(value = "0.0", inclusive = false)
private BigDecimal margin;

meaning margin must be positive non-zero value.

Of course, one could define custom constraint and it's implementation, but I think this is quite common case and @DecimalMin/@DecimalMax should be extended to support this. Any thoughts?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.