title: Codeigniter Radio button form validation?
body: <p>I want to validate three radio button inputs using codeigniter form validation rule:</p>
  <h2>HTML Page</h2>
  <pre><code>&lt;form action=&quot;&lt;?php echo base_url('register')&quot; ?&gt; method=&quot;POST&quot;&gt;
  
      &lt;input type=&quot;radio&quot; name=&quot;cars&quot; value=&quot;BMW&quot;&gt;
      &lt;input type=&quot;radio&quot; name=&quot;cars&quot; value=&quot;Ferrari&quot;&gt;
      &lt;input type=&quot;radio&quot; name=&quot;cars&quot; value=&quot;Jaguar&quot;&gt;
  
      &lt;input type=&quot;submit&quot; name=&quot;submitter&quot;&gt;
  
  &lt;/form&gt;
  </code></pre>
  <h2>Controller</h2>
  <pre><code>public function register()
  {
  
      $this-&gt;form_validation-&gt;set_rules('cars', 'Cars', 'required');
  
      if($this-&gt;form_validation-&gt;run() == TRUE)
      {
          i know what to do here
      }
      else
      {
          i know what to do here
      }
  }
  </code></pre>
  <p>How to do form validation in codeigniter for radio button in my case ?</p>