title: Fatal error: Call to undefined function validation_errors() using codeIgniter
body: <p>Fatal error: Call to undefined function validation_errors() using codeIgniter
  here's my <strong>comments.php</strong> view </p>
  
  <pre><code>        &lt;?php echo validation_errors(); ?&gt;
  
          &lt;?php echo form_open('news/comments'); ?&gt;
  
              Name   &lt;input type="text" name="comment_name"&gt;&lt;/input&gt;&lt;br /&gt;
              Email  &lt;input type="text" name="comment_email"&gt;&lt;/input&gt;&lt;br /&gt;
              Comment&lt;input type="text" name="comment_body"&gt;&lt;/input&gt;&lt;br /&gt;
              &lt;input type="submit" name="submit" value="Comment it" &gt;&lt;/input&gt;
  
          &lt;/form&gt;
  </code></pre>
  
  <p>here's my <strong>news_model.php</strong></p>
  
  <pre><code>&lt;?php
  class News_model extends CI_Model {
  
  public function __construct()
  {
      $this-&gt;load-&gt;database();
  }
  
  
  
  //set comment
  
  public function set_comment()
  {
  $this-&gt;load-&gt;helper('url');
  $this-&gt;load-&gt;helper('date');
  
  $data_c = array(
      'comment_name' =&gt; $this-&gt;input-&gt;post('comment_name'),
      'comment_email' =&gt; $this-&gt;input-&gt;post('comment_email'),
      'comment_body' =&gt; $this-&gt;input-&gt;post('comment_body'),   
  );
  
      return $this-&gt;db-&gt;insert('comments', $data_c);
  }
  </code></pre>
  
  <p>}</p>
  
  <p>here my controller <strong>news.php</strong></p>
  
  <pre><code>&lt;?php
  class News extends CI_Controller {
  
  public function __construct()
  {
      parent::__construct();
      $this-&gt;load-&gt;model('news_model');
  
  
  }
  
  
  
  public function create_comment()
  {
  $this-&gt;load-&gt;helper('form');
  $this-&gt;load-&gt;library('form_validation');
  
  
  $this-&gt;form_validation-&gt;set_rules('comment_name', 'comment_name', 'required');
  $this-&gt;form_validation-&gt;set_rules('comment_email', 'comment_email', 'required');
  $this-&gt;form_validation-&gt;set_rules('comment_body', 'comment_body', 'required');
  
  if ($this-&gt;form_validation-&gt;run() === FALSE)
  {
      echo 'failed'; //just for debugging
  
  }
  else
  {
      $this-&gt;news_model-&gt;set_comment();
      $this-&gt;load-&gt;view('news/success');
  }   
  
  
  }
  </code></pre>
  
  <p>}</p>
  
  <p>in <strong>routes.php</strong></p>
  
  <pre><code>$route['news/comments'] = 'news/comments';
  </code></pre>
  
  <p>how to resolve ?cannot insert data into database because of fatal error.</p>