Allow describing file upload fields #182

Merged
merged 2 commits into from May 28, 2014

Conversation

Projects
None yet
1 participant
Owner

weierophinney commented May 28, 2014

Currently, we allow specifying both filters and validators related to file uploads. However, file uploads need to be of a different Zend\InputFilter\Input type in order to be validated correctly: FileInput. This patch allows toggling a value indicating whether or not the field is an upload file; if so, the UI will send a type for the given field with a value of Zend\InputFilter\FileInput. Additionally, any fields returned by the API with that type will display with that flag toggled on.

weierophinney added some commits May 28, 2014

@weierophinney weierophinney Allow marking fields as file uploads
Adds a new toggle for marking a field as a file upload. If true, it sets the
`type` for the input field to `Zend\\InputFilter\\FileInput`, ensuring it can be
validated correctly within the input filter chain.

If a field returned by the API is a `FileInput`, ensures that the UI will
display it as a file upload.
7e6b8a6
@weierophinney weierophinney Rebuilt UI distribution 632fa2f
Owner

weierophinney commented May 28, 2014

Complements zfcampus/zf-content-validation#14 -- which makes it actually possible for validation to properly validate uploads.

@weierophinney weierophinney merged commit 632fa2f into zfcampus:master May 28, 2014

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@weierophinney weierophinney added a commit that referenced this pull request May 28, 2014

@weierophinney weierophinney Merge branch 'feature/fields-file-input'
Close #182
64b3de5

@weierophinney weierophinney added a commit that referenced this pull request May 28, 2014

@weierophinney weierophinney Merge branch 'feature/fields-file-input' into develop
Forward port #182
4f67938

weierophinney added this to the 1.0.2 milestone May 28, 2014

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