commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexandre Torres <>
Subject commons validator: rule for array
Date Tue, 19 Apr 2005 12:43:46 GMT
Hi. I'm using commons validator with struts.
I have a component with class FormA that has a set of components of
class RowB. Something like

FormA {
   public String getCode() {
   public void setCode() {
   public Vector getRows() {
   public void setRows(Vector v) {

RowB {
   public String getName() {
   public void setName(String n) {

I want to define a rule in validator where all "name" instances of
RowB should be required.
For FormA's property "code" I did:
      <field property="code" depends="required">
        <arg key="forma.code.displayname" />
But , for RowB I could not figure out how to make it, since I may have
zero, one or more RowB values... I see in the example this:

      <field property="[0]" depends="required">
        <arg key="" />
That validates only the first name in the set right ?
But if I have more than one name , what do I do ?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message