Hello,

i have a problem with a simple validation:

        $options = array(
                'allowEmpty' => false,
                'presence' => 'required'
        );

        // HTML Elemente und Leerzeichen filtern
        $filters = array(
            '*' => array(
                'StripTags',
                'StringTrim',
            ),
        );

        $validators = array(
            'filename'      => 'Alnum',
            'mode'          => 'Alpha',
            'resolution'    => 'Alnum'
        );

        require_once 'Zend/Filter/Input.php';
        $input = new Zend_Filter_Input($filters, $validators, $_GET,
$options);


The validation is working fine, the only problem i have now is with the
'filename' rule. Because there is no validator for filenames and 'Alnum'
is not usable with filenames.

So here my question: how to not set a validator for the 'filename' rule
without removing the $options settings ? So the 'filename' rule is not
allowed to be empty and must exists but no validation class should be used.

How to accomplish this ?

best regards,
Steven Truppe





Reply via email to