Hi, all
I am using Commons Validator to check my Swing inputting. There are two 
JTextFields: one it Time, Another is Duration. The Duration should be bigger 
than Time. So in checkDuration, I need the value of Time. But I do not know how 
to define in <form> and <field>.
Could you give me any suggestion?
Thanks a lot.
Arden


<!DOCTYPE form-validation PUBLIC
     "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 
1.1//EN"
     "http://jakarta.apache.org/commons/dtds/validator_1_1.dtd";>

<form-validation>
   <global>
          
       <validator name="checkTime"
          classname="app.common.validator.TimeValidator"
          method="validateTime"
          methodParams="java.lang.Object, org.apache.commons.validator.Field"
          msg="time.field"/>

       <validator name="checkDuration"
          classname="app.common.validator.DurationValidator"
          method="validateDuration"
          methodParams="java.lang.Object, org.apache.commons.validator.Field"
          msg="duration.field"/>
          
    </global>
    <formset>
       <form name="bertForm">
          <field property="time" depends="checkTime">
          </field>
          <field property="duration" depends="checkDuration">
          </field>
       </form>
    </formset>
</form-validation>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to