File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
validate for negative number
Joined: Apr 13, 2005
May 09, 2005 23:35:00
hi , how to we validate a number that should not contain negative number in validator ?
thanks in advance !
Joined: Oct 09, 2003
May 10, 2005 10:55:00
use this in your validation.xml
<field property="propertyname" depends="required,integer,intRange">
hope this would help
God Gave Me Nothing I Wanted<br />He Gave Me Everything I Needed<br /> - Swami Vivekananda
Joined: Apr 14, 2005
May 10, 2005 12:57:00
you can also use 'validwhen' if you're using
1.2.x and do a
for >= 0
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
I agree. Here's the link:
subject: validate for negative number
WA #1.....word association
Struts 2 + validate int value.
random numbers, returns a negative number?
Having trouble writing a method that factors negative numbers.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014