This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Providing list of values to a validator rule  RSS feed

 
Naseem Khan
Ranch Hand
Posts: 809
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Kris Ten
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!