Hi again,

I have the following simplified filter class.

------------------------------------------------------------------
class UserFilter extends InputFilter
{
    public function __construct()
    {
        $this->add($this->getFactory()->createInput(array(
            'name'     => 'email',
            'required' => true,
            'filters'  => array(
                array('name' => 'StripTags'),
                array('name' => 'StringTrim'),
            ),
            'validators' => array(
                array(
                    'name'    => 'EmailAddress',
                    'options' => array(
                    ),
                ),
                array(
                    'name'    => 'Db\NoRecordExists',
                    'options' => array(
                        'table' => 'users',
                        'field' => 'email',
                    ),
                ),
            ),
        )));
    }
}
------------------------------------------------------------------

The filtering does not work and throws an error:

    No database adapter present

I know that I can set the "adapter" option. But how can I access the db
adapter within my filter class?

Thanks again and best regards,

Ralf

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to