I'm creating a custom validator to enforce a <= relationship between 2 date fields and 
am having a problem.

A validator method gets a Field arg for the field with which it's associated in 
validation.xml, but I need to also get the Field object for the other date field. I 
need this so that I can get its property name for display in an error message. (I'd 
also like to be able to get the field's datePattern.) I can't figure out how to do 
this.

Any help would be much appreciated!

jim

Here's the relevant part of my validation.xml file:

      <form name="ActivityViewForm">
        <field
           property="starting"
           depends="date">
          <arg0 key="ActivityViewForm.starting.displayname"/>
          <var>
            <var-name>datePatternStrict</var-name>
            <var-value>MM/dd/yyyy</var-value>
          </var>
        </field>
        <field
           property="ending"
           depends="date,date1LEdate2">
          <arg0 key="ActivityViewForm.ending.displayname"/>
          <var>
            <var-name>datePatternStrict</var-name>
            <var-value>MM/dd/yyyy</var-value>
          </var>
          <var>
            <var-name>date1</var-name>
            <var-value>starting</var-value>
          </var>
        </field>
      </form>

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

Reply via email to