ZF-3985: Unable to validate select elements that contain optgroups

Description

Zend_Form_Element_Select supports option groups, but the default validator (InArray) is not given the correct values to test for.

<?php $form = new Zend_Form(); $form->setMethod('post'); $form->addElement($form->createElement('select', 'profession') ->setLabel('Profession') ->setMultiOptions(array( 'Technology' => array( '1' => 'Web Developer', '2' => 'Software Engineer' ) )) ); $form->addElement($form->createElement('submit', 'submit') ->setLabel("Submit") ); $fakePostData = array('profession' => '1'); $form->isValid($fakePostData); // Not valid ?>

Comments

assigned

Bugfix for this issue with relevant unit tests (result of bughunt day)

Fixed with r12527. Thanks for the fix.

Changing issues in preparation for the 1.7.0 release.