06-20-2016, 06:15 PM
not sure if this is possible but thought i would ask anyway
form validation - thats validating an array of data - in this case a group of products - one rule has a callback. like
and then the callback goes to the method: sku_check($str)
all that works fine, churns through and checks an array of products no problem. Now is there a way to pass the correct Product ID from the array to the callback method? So i could have
sku_check($str,$productid)
form validation - thats validating an array of data - in this case a group of products - one rule has a callback. like
PHP Code:
$this->form_validation->set_rules('productid[]', 'Product ID', 'required');
$this->form_validation->set_rules('productsku[]', 'Product SKU', 'callback_sku_check');
and then the callback goes to the method: sku_check($str)
all that works fine, churns through and checks an array of products no problem. Now is there a way to pass the correct Product ID from the array to the callback method? So i could have
sku_check($str,$productid)