You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael Mattox <mi...@verideon.com> on 2003/04/11 14:13:48 UTC
validating required multiple html:select
I have a multiple html:select that I would like to be required (user must
select one or more of the values). I can't get it to work, and a search in
the archives showed several others having this problem with no solution. I
have all other required fields working, except the html:select.
<bean:message key="monitor.create.prompt.locations"/>
<html:select property="monitorLocationsAsString" size="3" multiple="true">
<option value="">Please select
<logic:iterate id="locations" indexId="myIndex" name="locationList"
scope="request">
<option value="<bean:write name="locations"filter="true"/>" SELECTED>
<bean:write name="locations"filter="true"/>
</option>
</logic:iterate>
</html:select>
<P>
<form name="createUrlMonitorForm">
<field property="monitorLocationsAsString"
depends="required">
<arg0 key="monitor.create.prompt.locations"/>
</field>
</form>
Is this a bug?
Michael Mattox
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org