This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

validate for negative number

 
Nakata kokuyo
Ranch Hand
Posts: 465
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi , how to we validate a number that should not contain negative number in validator ?

thanks in advance !
 
MInu
Ranch Hand
Posts: 517
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...

use this in your validation.xml

<field property="propertyname" depends="required,integer,intRange">

hope this would help
 
alan do
Ranch Hand
Posts: 354
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can also use 'validwhen' if you're using struts 1.2.x and do a test for >= 0
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic