Welcome Guest, Not a member yet? Register   Sign In
Form Validation - Modify Second Parameter
#1

[eluser]jamgood96[/eluser]
Is it possible to modify the second parameter for a custom callback?

Code:
$something = 14

Code:
$this->form_validation->set_rules('name', 'Name', 'callback_valid_name['.$something.']');

Code:
public function valid_address($value, $something) {

    $something = 20

}

Say I want to pass something to a custom callback. For example, I pass $something and it is equal to 14. After it gets passed and the callback function returns, $something is no equal to 20. Does that make sense?

I'm not having any luck with it thus far.


Messages In This Thread
Form Validation - Modify Second Parameter - by El Forum - 01-30-2012, 05:13 PM
Form Validation - Modify Second Parameter - by El Forum - 01-30-2012, 05:32 PM
Form Validation - Modify Second Parameter - by El Forum - 01-30-2012, 05:40 PM
Form Validation - Modify Second Parameter - by El Forum - 01-30-2012, 05:48 PM
Form Validation - Modify Second Parameter - by El Forum - 01-30-2012, 05:50 PM
Form Validation - Modify Second Parameter - by El Forum - 01-30-2012, 05:52 PM
Form Validation - Modify Second Parameter - by El Forum - 01-30-2012, 05:56 PM
Form Validation - Modify Second Parameter - by El Forum - 01-30-2012, 06:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB