Welcome Guest, Not a member yet? Register   Sign In
Form validation with array as value
#1

[eluser]Unknown[/eluser]
This was working in previous CI version. Not sure if I am missing something, but I cannot get this to validate when the value of the post is an array...

Code:
$_POST['field[]'] = array('2', '3', '5');

$this->load->library('form_validation');
$val = $this->form_validation;

$val->set_rules('field[]', 'FIELD', 'required');

if($val->run()) echo set_value('field[]');
else echo 'ERROR:'.form_error('field[]');




Theme © iAndrew 2016 - Forum software by © MyBB