| Author |
Passing more than 1 argument to error message
|
Imre Tokai
Ranch Hand
Joined: Jun 04, 2008
Posts: 129
|
|
Hello,
I'm adding errors to via:
and i don't know how to pass more than 1 argument?
If error message is: "{0} must be unique", contains the value that will replace {0}.
But what if I want to have error message: "{0} must be greater than {1}"?
How to pass the argument that will replace {1}?
Regards
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
Try adding two arguments in the same 'Field' object
http://commons.apache.org/validator/api-1.3.1/org/apache/commons/validator/Field.html#addArg(org.apache.commons.validator.Arg)
field.addArg(); // {0}
field.addArg(); // {1}
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
 |
|
|
subject: Passing more than 1 argument to error message
|
|
|