Is it possible to use Zend_Filter_Input as a generic input filter? I want to use it to filter all form fields (strip tags etc but no validation). All the examples seem to include a $validators array and pre-suppose that I will know the names of the fields on the way in.
Because of the nature of the project, timescales etc, it is not possible to rewrite the forms using Zend_Form. There is a generic Form class which handles all form input so I need to do the filtering in there.
Thanks!
Luke.
You can simply pass an empty array for the
$validatorsargument to skip validation and simply use filtering.Are you saying that you don’t know the field names you’ll pass into the
Zend_Filter_Inputinstance? You can use the wildcard*-field to apply a filter to all input fields. Is this what you’re asking for?will filter all values in
$datawith theZend_Filter_StripTagsfilter.EDIT:
Retrieve the values with