wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Providing list of values to a validator rule
 
Similar Threads
How do we know what [var-name] a validation rule required?
working example of struts validator framework
Validation pattern.
unalbe to pass attribute values to validator
Validating some extra fields of action form not in my jsp?