[eluser]doktorcivanim[/eluser]
Hi,
I am working on a form and have two problems.
My first is, I have a custom validation function, it is correctly called, but I cannot get the parameter. I only get the name of the parameter I give (['username'] gives the value 'username').
To ressolve this, I used the $this->input->postfunction to get the parameter.
The second problem is that when giving an error (set_message) I get "Unable to access an error message corresponding to your field name." What is wrong?
My function and declaration of rules:
Code:
//Rules
$this->form_validation->set_rules('begin_date', 'Begindate', 'callback_checkBeginDate[end_date]');
$this->form_validation->set_rules('begin_date', 'Enddate');
//Custom rule
function checkBeginDate($beginDate,$endDate){
...
$this->form_validation->set_message('begin_date', 'Enddate must be bigger or equal to begindate');
...
...
Thanks.