Thanks for the issue report Jakub, I have logged it as 
http://framework.zend.com/issues/browse/ZF-1437 and I will begin working on it.
 
Regards,
Bill Karwin


________________________________

        From: Jakub Podhorský [mailto:[EMAIL PROTECTED] 
        Sent: Saturday, May 26, 2007 3:47 AM
        To: [email protected]
        Subject: [fw-general] Zend_Filter_Input problem
        
        

        Hello,

        I've got one problem with Zend_Filter_Input and I don't know how to 
solve it. I have:

         

        <?php

        $data = array(   'nick' => '',

                                'email' => '[EMAIL PROTECTED]',

                                'message' => 'my long message'

                                );

        $filters = array(  '*' => new Zend_Filter_StringTrim(),

                                'nick' => new Zend_Filter_StripTags()

                                );

        $validators = array(        'email' => array( new 
Zend_Validate_EmailAddress(),

                                                                   
Zend_Filter_Input::ALLOW_EMPTY => true

                                                                   ),

                                           'nick' => array(  
Zend_Filter_Input::PRESENCE => Zend_Filter_Input::PRESENCE_REQUIRED,

        Zend_Filter_Input::ALLOW_EMPTY => false

        )

                                           );

        $input = new Zend_Filter_Input($filters, $validators, $data);

        if ($input->hasInvalid())

        {

        $message = $input->getMessages();

        }

        ?>

         

        If I have empty string in nick field it can't pass but it doesn't work. 
I don't need to make any other validation on that field. 

         

        Thanks for every help,

        Jakub Podhorský

Reply via email to