I'm using codeigniter and I have this problem.
There an array of radio button like below:
<input type="radio" name="title[0]" value="Mr."> Mr.
<input type="radio" name="title[0]" value="Ms."> Ms.
<input type="radio" name="title[0]" value="Mrs."> Mrs.
<input type="radio" name="title[0]" value="Dr."> Dr.
<input type="radio" name="title[0]" value="Prof."> Prof.
<input type="radio" name="title[1]" value="Mr."> Mr.
<input type="radio" name="title[1]" value="Ms."> Ms.
<input type="radio" name="title[1]" value="Mrs."> Mrs.
<input type="radio" name="title[1]" value="Dr."> Dr.
<input type="radio" name="title[1]" value="Prof."> Prof.
Of course they are not created manually, but using "for"
In the controller, there is a validation like this:
$this->form_validation->set_rules('title[]', 'Title', 'trim|required|xss_clean');
The strange thing is, after I choose a title in radio button with name title[0], it is considered valid eventhough title[1] is not chosen. Is this codeigniter's bug? Please help.