Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

Allow describing file upload fields #182

Merged

Conversation

weierophinney
Copy link
Member

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.

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.
@weierophinney
Copy link
Member Author

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
weierophinney added a commit that referenced this pull request May 28, 2014
weierophinney added a commit that referenced this pull request May 28, 2014
@weierophinney weierophinney added this to the 1.0.2 milestone May 28, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant