-- andyjab <[email protected]> wrote
(on Monday, 19 January 2009, 08:28 AM -0800):
> 
> Fixed with:
> 
>       if ($this->_request->isPost())
>               {
> 
> 
>                               if ($form->isValid($_POST))

Just a couple notes here... For testing purposes, it's better to pull
the data from the request object. Additionally, it's best to use the
getRequest() accessor instead of the protected member to ensure API
compatibility with future versions of ZF. So, I'd rewrite the above to:

    $request = $this->getRequest();
    if ($request->isPost()) {
        if ($form->isValid($request->getPost())) {
            ...
        }
    }


>                       {
>                               
>                               $formData = $form->getValues();
> 
> Was retrieving the data before validating it with       $formData =
> $this->_request->getPost();, filtering it and then using the original data. 
> 
> Fixed now. 

-- 
Matthew Weier O'Phinney
Software Architect       | [email protected]
Zend Framework           | http://framework.zend.com/

Reply via email to