Kohana’s Validation library has a pre_filter() method which lets you apply any PHP function to fields to be validated, as trim(), etc.
I tried to use a static method as a filter, but won’t work:
$validation->pre_filter( 'field_name', 'class::method' )
What that does is create two filters, one with class and antoher one with method.
Any clues?
A callback is one of PHP’s pseudo-types. It will let you pass a
to a PHP function/method that’s expecting a callback, and the PHP function/method will know what to do with it.
From the manual
So, to use a static method in place of a callback string, you’d use
If Kohana is using standard PHP callbacks, this should give you what you want.