The Upload validator might be broken #2486

Closed
zfbot opened this Issue Sep 28, 2012 · 2 comments

Comments

Projects
None yet
3 participants
@zfbot

zfbot commented Sep 28, 2012

Jira Information

Original Issue:ZF2-327
Issue Type:Bug
Reporter:Michael Ben-Nes
Created:05/29/12
Assignee:weierophinney
Components:Zend\Validator

Description

Whatever I do I get no error nor object to work with. Other validators work as expected.

At the Zend\Validator\File\Upload the construct suppose to catch $_FILES in no file list was passed. Seems like it dont.

# from the form object

$this->add($factory->createElement(array(
    'name'  => 'resource_file',
    'attributes' => array(
        'label' => 'File:',
        'type'  => 'file',
    ),
)));
# from the filter (one of the variation I tried )

$this->add($factory->createInput(array(
    'name'       => 'resource_file',
    'required'   => true,
    'validators' => array(
        array(
            'name'      => 'File\Upload',
            'options'   => array (
                'files' => $_FILES,
            ),
            'files' => $_FILES,
        ),
    ),
)));
@zfbot

This comment has been minimized.

Show comment
Hide comment
@zfbot

zfbot Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF2-327

Known GitHub users mentioned in the original message or comment:
@weierophinney

zfbot commented Sep 28, 2012

This issue was ported from the ZF2 Jira Issue Tracker at
http://framework.zend.com/issues/browse/ZF2-327

Known GitHub users mentioned in the original message or comment:
@weierophinney

@cgmartin

This comment has been minimized.

Show comment
Hide comment
@cgmartin

cgmartin Jan 23, 2013

Contributor

This one can be closed based on the file upload changes in ZF 2.1.

Contributor

cgmartin commented Jan 23, 2013

This one can be closed based on the file upload changes in ZF 2.1.

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