cphalcon
cphalcon copied to clipboard
[BUG] any filter in Forms throws an exception: Sanitize filter is not supported
class Login extends Form
{
public function initialize()
{
$email = new Text('email');
$email->addValidator(new Email());
$email->addFilter('trim'); //int, striptags, lower... etc, no matter
$this->add($email);
}
}
if ($form->isValid($_POST)) {
}
and we can see an exception with mystical NULL in the trace:
Phalcon\Filter\Exception: Sanitize filter is not supported
0 Phalcon\Filter->_sanitize([email protected], null)
1 Phalcon\Filter->sanitize([email protected], Array([0] => null, [1] => trim))
2 Phalcon\Validation->getValue(email)
3 Phalcon\Validation\Validator\Email->validate(Object(Phalcon\Validation), email)
phalcon 1.2.2
thanks!