You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Stephen Ting <st...@shinyang.com.my> on 2002/08/23 10:43:03 UTC
Validator for checkbox
i have problems to use validator framework to validate checkbox.
I declare an array of string in my DynaValidatorForm, it will hold value
return from a multibox.
i try with the following configuration, but it doesn't work.
even i also try add indexedListProperty="selectedSite" attribute in the
field element and it doesn't work too.
could anyone point where i get wrong???
<form-bean name="InventoryEnquiryForm"
dynamic="true"
type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="itemNo" type="java.lang.String"/>
<form-property name="description" type="java.lang.String"/>
<form-property name="selectedSite" type="java.lang.String[]"/>
<form-property name="searchLogic" type="java.lang.String"/>
<form-property name="view"
type="my.com.shinyang.einout.inventory.view.InventoryEnquiryViews"/>
</form-bean>
------------------------------------------------------------------------
---------------------------
<!-- Inventory Enquiry Form -->
<form name="InventoryEnquiryForm">
<field
property="description"
depends="required, minLength">
<arg0
key="inventoryEnquiryForm.description.displayName"/>
<arg1 name="minlength" key="${var:minlength}"
resource="false"/>
<var>
<var-name>minlength</var-name>
<var-value>3</var-value>
</var>
</field>
<field
property="selectedSite"
depends="required">
<arg0 key="inventoryEnquiryForm.site.displayName"/>
</field>
</form>