[eluser]jstrebel[/eluser]
Also for the life of me I cannot get the validation to work for fields using arrays:
My view:
Code:
<?=form_error('i[]'); ?>
<input type='text' name="i[]" size="30" value="<?=set_value('i[]'); ?>"/>
<input type='text' name="i[]" size="30" value="<?=set_value('i[]'); ?>"/>
<input type='text' name="i[]" size="30" value="<?=set_value('i[]'); ?>"/>
My Controller rule:
Code:
$this->form_validation->set_rules('i[]', 'Name', 'required|min_length[5]');
On submission with empty fields, no error message is shown, and it repopulates the field with a string "Array"
The $_POST array looks like:
Code:
Array
(
[title] =>
[rtype] => 1
[cite_source] =>
[desc] =>
[i] => Array
[tags] =>
[recipeForm] => Create
)
$_POST\[i\] is given a string value of "Array"
The rest of the validation on the form works fine, title, desc, etc.. those fields all show errors and get repopulated as needed.
Using latest CI code set: Updated external to revision 1580.
What gives?