Welcome Guest, Not a member yet? Register   Sign In
Trying to use form_validation rule group; not happening

[eluser]Daniel H[/eluser]
Hi all,

I'm trying to validate a comment form against a rule group specified in a config file named form_validation.php. It contains this:

$config = array(
                 'comment_form' => array(
                                            'field' => 'content',
                                            'label' => 'Comment',
                                            'rules' => 'trim|xss_clean|strip_tags|required'

Then I'm trying to load the rule using:

// Run the comment form validation
        if ($this->form_validation->run('comment_form'))

However, it appears that the form validation is not performed at all (and no error occur). Am I missing the point here?


Theme © iAndrew 2016 - Forum software by © MyBB