commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Per Lövdinger <per_lovdin...@yahoo.se>
Subject validation rule in one place
Date Tue, 30 Nov 2004 07:15:36 GMT
Hi there,
I have a question concerning Struts validator framework:
If have the same attribute for example salary in two forms is there any
possibility 
to define the validation rule in one place. 
So that my form-field can depend on that rule.
regards 

<form-validation>
  <formset>   
    
    <form name="userFormVF">
      <field property="userId" depends="required">
        <arg0 key="prompt.userId"/>
      </field>
      <field property="salary" depends="double">
        <arg0 key="prompt.salary"/>
      </field>
    </form>
    
    <form name="userFormDVF">
      <field property="userId" depends="required">
        <arg0 key="prompt.userId"/>
      </field>
      <field property="salary" depends="double">
        <arg0 key="prompt.salary"/>
      </field>
    </form>
  </formset>
</form-validation>

 

Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message