Joe*_*ssi 1 php validation kohana-3 kohana-auth
试着在这里按照wiki上的示例:扩展模型Auth用户类,并且当它进行验证时我遇到致命错误.
ErrorException [ Fatal Error ]: Class 'Validate' not found
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?这是它失败的代码片段:
class Model_User extends Model_Auth_User
{
public function validate_create(& $array)
{
// Initialise the validation library and setup some rules
$array = Validate::factory($array)
->rules('password', $this->_rules['password'])
->rules('username', $this->_rules['username'])
->rules('email', $this->_rules['email'])
->rules('password_confirm', $this->_rules['password_confirm'])
->filter('username', 'trim')
Run Code Online (Sandbox Code Playgroud)
使用3.1? Validate
现在Validation
已经删除了过滤器.
查看http://kohanaframework.org/3.1/guide/kohana/upgrading和http://forum.kohanaframework.org/discussion/comment/57374.