2011-05-23 66 views
1

試圖按照這裏的wiki上的示例:extending model Auth user class,並且當它進行驗證時我遇到了一個致命錯誤。Kohana 3在驗證時拋出一個致命錯誤

ErrorException [ Fatal Error ]: Class 'Validate' not found 

任何想法?這是它失敗的代碼片段:

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') 

回答