commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Zatko <>
Subject Validator with DynaValidatorForm
Date Fri, 23 Apr 2004 18:23:48 GMT
    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="${}">
>                             <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=""
style="width: 200px;"></td>

In my validation.xml, I have the following for this property:

         <field    property="emails"
                  <arg0 key="editProfile.form.emails.invalid"/>
                  <arg1 name="maxlength" key="${var:maxlength}" 

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?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message