permaculture playing cards*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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