[eluser]it.peds[/eluser]
In the view, I have several pairs of input fields like below
Code:
<input type="text" name="address[]" value="" />
<input type="text" name="type[]" value="" />
In the controller, I want to set up a callback validation like
Code:
$this->form_validation->set_rules('type[]', 'Address Type', 'callback_requireIfAssoicatedAddressIsFilled[address[]]');
Please advise on how I can code the callback validation, so type[0] is checked with only address[0] not the whole array when looping through the form_validation.excute()