I have a simple form.
$country = new Text('country', array('required' => true,'class' => 'span12', 'data-sort' => 5));
$country->addValidator(new PresenceOf(array('message' => 'Пожалуйста, укажите страну проживания.')));
$country->setFilters(array('trim, string'));
$country->setLabel('Страна');
/* other elements */
in cntrl
form->bind($_POST, $userEntity);
I get exception
Phalcon\Filter\Exception: Sanitize filter trim, string is not supported
but when I change setFilters to addFilter it works correct. What I'm doing wrong?
Problem solved: setFilters(array('trim', 'string'); =)