Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache Commons Validation

 
Ravi Shankar Mukkavilli
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,

I'm using apache commons validation for validating my form.I have this case for which I'm not able to define the rule. I have 4 fields in the form, and the user has to fill in at least one before hitting the submit. How can I validate this?

Also I have a validation something like this in my validation.xml file



As you can see reworkHours depends on the reworked to be NOTNULL, actually I want the reworked field should have a "valid" value before validating the reworkHours field. So can I replace "NOTNULL" in the
<var-value>NOTNULL</var-value> with something which will in fact validate for say as an Integer instead of just NOTNULL.

Any help in the above two question would be really helpful.

Thanks.

Ravi
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't there an expression validator?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic