Hi,
In my own validation rule callback, i want to check what is the content of each parameters for debugging.
Espacialy the second one in which i put 2 variables: $table and $field.
Here are the rules in the controller:
$table = 'companies'; $field = 'name'; $param = $field.'|'.$table; $crud->set_rules('name', 'Name', 'trim|required|min_length[2]|max_length[50]|callback_is_unique_id_excluded['.$param.']');
And my callback:
public function is_unique_id_excluded($input, $param){ echo 'input = '.$input.'<br>'; echo 'param = '.$param.'<br><br>'; //extract the field and table names on which the rule is to apply list($field, $table) = explode('|', $param); etc...
But echo functions don't work even followed by a die to stop the validation process. Why?
So what is the best way to find errors in my form validation rule callback?
Thank you.