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

Issue Type: Bug Created: 2008-08-18T11:50:54.000+0000 Last Updated: 2008-11-13T14:10:05.000+0000 Status: Resolved Fix version(s): - 1.7.0 (17/Nov/08)

Reporter: Hector Virgen (djvirgen) Assignee: Thomas Weidner (thomas) Tags: - Zend_Form

Related issues: Attachments: - ZF-3985.patch


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

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 ?>


Posted by Ralph Schindler (ralph) on 2008-11-08T06:16:52.000+0000


Posted by Thomas Corthals (turboke) on 2008-11-10T12:45:38.000+0000

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

Posted by Thomas Weidner (thomas) on 2008-11-10T13:02:36.000+0000

Fixed with r12527. Thanks for the fix.

Posted by Wil Sinclair (wil) on 2008-11-13T14:10:05.000+0000

Changing issues in preparation for the 1.7.0 release.

Have you found an issue?

See the Overview section for more details.


© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.