Try
<field property="address" indexedListproperty="emails"
depends="maxlength">
Niall
----- Original Message -----
From: "Mike Zatko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 23, 2004 11:08 PM
Subject: Validator with DynaValidatorForm
> Hello,
> I have a DynaValidatorForm called EditProfileForm defined with a Form
> Property of "emails". The type for the property is EmailAddress[] and
> has no size property which means I generate it dynamically. The
> EmailAddress bean has a property of "address", denoting the actual value
> of the email adress. Now, in the JSP I have a textbox for each
> EmailAddress.
>
> > <c:forEach var="emails"
> > items="${EditProfileForm.map.emails}">
> > <tr>
> > <td width="240"><html:text
> > style="width: 200px;" name="emails" indexed="true"
> > property="address"/></td>
> > </tr>
> > </c:forEach>
>
>
>
> The source for the generated HTML is as follows:
>
> <td width="240"><input type="text" name="emails[1].address"
> value="[EMAIL PROTECTED]" style="width: 200px;"></td>
>
>
> In my validation.xml, I have the following for this property:
>
> <field property="emails"
> depends="maxlength">
> <arg0 key="editProfile.form.emails.invalid"/>
> <arg1 name="maxlength" key="${var:maxlength}"
> resource="false"/>
> <var>
> <var-name>maxlength</var-name>
> <var-value>50</var-value>
> </var>
> </field>
>
> The validator is not working on my dynamic fields. I do have other
> properties on this same page that are validated fine, just not this
> dynamic one.
> Anybody have any ideas how to get it working?
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]