I have a composite element (MultiCheckbox for pre-defined values + Text for custom values; all having the same name) that is having validation problems. The field is required (at the very least, one of the checkboxes must be checked *or* there must be a value in the text field).
The problem is that text fields are always submitted and a NotEmpty validator will fail on an empty text field, even if one of the boxes is checked. Even a custom validator that uses the $context parameter is not ideal, as it will still be called for each and every value in the element's array. A similar problem with Zend_Filter_Input was worked around by hacking in a TRAVERSE_ARRAY boolean option, but that seems impossible to implement in Zend_Form without rebuilding the entire Zend_Form_Element_* family on top of a custom validator class. Does anyone have any thoughts on this? Thanks, Ryan