[eluser]Unknown[/eluser]
In my form I have named my inputs as so:
<input type="text" name="guest[first_name]" />
<input type="text" name="guest[last_name]" />
<input type="text" name="guest[email]" />
With the validation library, they say to define fields like:
$rules['first_name'] = "required";
$rules['last_name'] = "required";
$rules['email'] = "required";
So the problem is that when it goes to validate, it's expecting to find $_POST['first_name'], etc.
So my question is, is there syntax to define a field where it is in a form array? (e.g. name="guest[first_name]").
I've tried:
$rules['guest[first_name]'] = "required";
$rules['guest']['first_name'] = "required";
...and neither worked.
Any help appreciated!