This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread 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 Elasticsearch in Action this week in the Big Data 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
 
rocket mass heater kickstarter
 
subject: Providing list of values to a validator rule