I want an argument in my xml field-element, for the max and min length validation. I have done it based on the dtd file but it doesn't work. The validator doesn't get the value. So I get a nullpointer exception.

How must I write the argument in the field element?

      <field property="name"
        depends="required,minlength,maxlength">
        <arg0 key="register.validate.name"/>
        <arg1 name="minlength"
              key="${var:minlength}" 
              resource="false"/>
        <arg1 name="maxlength"
              key="${var:maxlength}"
              resource="false"/>
        <var>
          <var-name>minlength</var-name>
          <var-value>1</var-value>
        </var>
        <var>
          <var-name>maxlength</var-name>
          <var-value>255</var-value>
        </var>
      </field>

Where:

ValidatorXmlFile (last edited 2009-09-20 23:48:35 by localhost)