I am having problem's with adding a filter in Kohana 3.1
I am having some problems adding a callback filter in Kohana 3.1.
Here is my validator:
Validation::fa开发者_如何学Pythonctory($fields)
->rules('username', $this->_rules['username'])
->rule('username', 'username_available', array($this, ':field'))
->rules('email', $this->_rules['email'])
->rule('email', 'email_available', array($this, ':field'))
->rules('password', $this->_rules['password'])
->rules('password_confirm', $this->_rules['password_confirm'])
->filter('password', $this->_filters['password']);
Here is the array for the filter:
protected $_filters = array(
'password' => array(
'Auth::instance' => 'hash'
)
);
It used to look like this:
public function filters()
{
return array(
'password' => array(
array(array(Auth::instance(), 'hash'))
)
);
}
Thanks in advance for any help!
Validation in Kohana 3.1+ doesn't support filters, it's ORM-only feature.
精彩评论