阅读背景:

验证和检查表单是否已实际发布的解决方法

来源:互联网 

Here is my typical form

这是我的典型形式

        $errors = array();

        if ($this->request->post('submit')) { // <----- I don't like this line
            $post = Validation::factory($this->request->post())
                ->rule('email', 'not_empty')
                ->rule('email', 'email')
                ->rule('password', 'not_empty');

            if ($post->check()) {
                // ok, do something
            }

            $errors = $post->errors(true);
        }

        $this->template->content = View::factory('auth/register')
            ->set('errors', $errors);
        $e



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: