Im setting up a form:
<?php
$item = new \CoreExt\Form\Element\Numeric(self::NAME_KILOMETER_VALUE);
$item->addFilter('naturalnumber');
in services.php, I do register this:
<?php
$filter = new \Phalcon\Filter();
$filter->add('naturalnumber', function ($value) {
return abs((int)$value);
});
still, when I validate the form:
sanitize filter 'naturalnumber' is not supported