Inside a \Phalcon\Forms\Form I add my own valdator:
$item->addValidator(new \CustomEmailValidator(array(
'message' => 'bad!')
));
this looks like:
class CustomEmailValidator extends Phalcon\Validation\Validator implements Phalcon\Validation\ValidatorInterface
{
public function validate(\Phalcon\Validation $validator, $attribute)
{
return false;
}
}
the problem is, no matter what I return, it wont stop the validator. I expect it failed, just like I had set any other validator