We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Form filter wont do anything, do I use it right?

Im creating my form input:

<?php
$f = new \Phalcon\Forms\Element\Text('price');
$f->addFilter('trim');
$this->add($f);

it has no effect after isValid(). Actually, none of filter method works. 2.0.8



222

Try bind your form with a model:

$form->bind($this->request->getPost(), $model);