wood burning stoves 2.0*
The moose likes Struts and the fly likes Apache Commons Validation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Apache Commons Validation" Watch "Apache Commons Validation" New topic
Author

Apache Commons Validation

Ravi Shankar Mukkavilli
Greenhorn

Joined: Feb 10, 2009
Posts: 12
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


SCJP 1.4
SCWCD 1.4
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Isn't there an expression validator?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache Commons Validation
 
Similar Threads
Validate multiple fields base on a requiredif
Struts 1.1 validation help on Requiredif
Exception while loading the validation.xml in strusts
Struts Validation problem
custom validator and custom tags