I'm reading the validator 1.1.3 DTD file and I'm trying to understand the
purpose of the "position" attribute in the <arg> element and the <arg>
element itself.  According to the DTD: 'The "arg" element defines a
replacement value to use with the message template for this validator or
this field.'

Can someone please dumb this down for me?

So, if I have:

<field property="meetingDate"
       depends="required, date, maxlength, mask">
  <arg position="0" key="prompt.date"/>
  <arg position="1"
       name="maxlength"
       key="${var:maxlength}"
       resource="false"/>
  <var>
    <var-name>datePattern</var-name>
    <var-value>MM/dd/yyyy</var-value>
  </var>
  <var>
    <var-name>maxlength</var-name>
    <!-- the value here MUST match the maxlength attribute in the JSP
         for the text field with this property name -->
    <var-value>12</var-value>
  </var>
  <var>
    <var-name>mask</var-name>
 
<var-value>^(((0?[1-9]|1[012])/(0?[1-9]|1\d|2[0-8])|(0?[13456789]|1[012])/(2
9|30)|(0?[13578]|1[02])/31)/(20)((0[6-9])|(10))|0?2/29/((20)(0[48])))$</var-
value>
  </var>
</field>

Does the position attribute refer to the "index" of the <var> element?  So
that it knows which "rule" to match?

Thanks,

-Adam

Reply via email to