Welcome Guest, Not a member yet? Register   Sign In
How to pass a param when using a model method as callable using form validation lib?
#6

Also, instead of using a Callable, just create a rule like this

$validation_config = array(
array(
'field' => 'username',
'label' => 'Username',
'rules' => 'trim|required|min_length[6]|callback_username_duplicate_check_edit['.$data_selected_user['username'].']'
));

and in your validation method, you can access it like as below ($rule_param_value is the value passed above in the rule)

function username_duplicate_check_edit($new_value, $rule_param_value) {
//
}
Reply


Messages In This Thread
RE: How to pass a param when using a model method as callable using form validation lib? - by happyape - 02-01-2018, 08:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB