FilterValidator is actually not a validator but a data processor.
It invokes the specified filter callback to process the attribute value
and save the processed value back to the attribute. The filter must be
a valid PHP callback with the following signature:
php
function foo($value) {
compute $newValue here
return $newValue;
}
Many PHP functions qualify this signature (e.g. trim()).
To specify the filter, set [[filter]] property to be the callback.