This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Providing list of values to a validator rule Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Providing list of values to a validator rule" Watch "Providing list of values to a validator rule" New topic
Author

Providing list of values to a validator rule

Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
Hi,

I have used Jakarta common validator package for writing custom validation rule.

My question is can I pass a list of values to the rule. Right now I am passing value by arg tag. Problem which I am facing is I can pass up to arg3. Arg4 is not defined. So I can't pass more than 4 to my validator method.

Is there any other way of doing it?


Asking Smart Questions FAQ - How To Put Your Code In Code Tags
Kris Ten
Greenhorn

Joined: Feb 28, 2007
Posts: 11
How are you getting the values to pass in? Are they from an html:form or something? If so, you may want to validate them as different fields. If not, would it be applicable to do a "requiredif" type of validation? Just some things to think about...

Cheers,
Kristen
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Providing list of values to a validator rule