title: Codeigniter csrf protection without form validation
body: <p>I have enabled csrf protection in Codeigniter. Using <code>form_open()</code>I'm able to produce a hidden csrf value that should be verified in my controller. However I'm not submitting any input fields but just passing a url paramater via the form action. </p>
  
  <p>In my controller I don't need to set validation rules so I have</p>
  
  <pre><code>function delete_post($post_id = '') //post id passed via 3rd URL segment
  { 
      if (is_int($post_id) &amp;&amp; valid_post($post_id)) //valid_post() returns true if post id exists
      {   
         $this-&gt;Posts_model-&gt;delete_post_model($post_id);         
         redirect('site');  
      }                   
  }
  </code></pre>
  
  <p>Csrf protection doesn't seem to work without validation rules. Is it possible to make this work without passing <code>post_id</code> via a hidden input?</p>