Welcome Guest, Not a member yet? Register   Sign In
Using form validation to validate the $post array
#2

You can set your rules by a simple loop like that (untested but i should work).

PHP Code:
for ($i=1$i<=52$i++)
{
    
$this->form_validation->set_rules('item'.$i'Item : '.$i'required');


You need a logic inside for your labeling .. dont see a exact logic there item1, item1a .. then item2, item2b .. etc. or all item {number|number.b}?

Reply


Messages In This Thread
RE: Using form validation to validate the $post array - by Rufnex - 12-11-2014, 02:34 PM



Theme © iAndrew 2016 - Forum software by © MyBB