Welcome Guest, Not a member yet? Register   Sign In
Form Validation Callback With Parameter from Array ?
#1

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

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)
Reply


Messages In This Thread
Form Validation Callback With Parameter from Array ? - by cartalot - 06-20-2016, 06:15 PM



Theme © iAndrew 2016 - Forum software by © MyBB