繁体   English   中英

Kohana 3 在验证时抛出致命错误

[英]Kohana 3 throwing a fatal error when validating

尝试在此处遵循 wiki 上的示例: 扩展 model Auth user class ,并且在进行验证时遇到了致命错误。

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

使用 3.1? Validate现在是Validation ,过滤器已被删除。

查看http://kohanaframework.org/3.1/guide/kohana/upgradinghttp://forum.kohanaframework.org/discussion/comment/57374

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM