form validation fails on dyamic collections if the input filter is "generated" before the data is set #5243

dpommeranz opened this Issue Oct 8, 2013 · 3 comments


None yet
3 participants

dpommeranz commented Oct 8, 2013

this error occurs for example if you use the fileprg plugin and add a new item to the collection. the fileprg alters the "generated" input filter (FilePostRedirectGet.php line 67) and sets the data afterwards.

public function testCanCallGetInputFilterBeforeSetDataWithDynamicCollection()
    $dataWithCollection = array(                                             
        'foo' => 'bar',                                                      
        'categories' => array(                                               
            0 => array('name' => 'cat1'),                                    
            1 => array('name' => 'cat2'),                                    
        'type' => 'Zend\Form\Element\Collection',                            
        'name' => 'categories',                                              
        'options' => array(                                                  
            'count' => 1,                                                    
            'allow_add' => true,                                             
            'target_element' => array(                                       
                'type' => 'ZendTest\Form\TestAsset\CategoryFieldset'         
        'categories' => array(                                               

dpommeranz commented Oct 18, 2013

@steverhoades Could you add the test case into your branch and tell me if it fixes the issue? That would be great ;)


steverhoades commented Oct 18, 2013

@dpommeranz ok, it does not resolve your issue. I am looking into it, perhaps I can include it in my PR.


adamlundrigan commented Oct 21, 2015

The provided test passes against Zend\Form master. I'd guess it's been fixed since?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment