0 Replies - 163 Views - Last Post: 11 March 2012 - 09:14 PM Rate Topic: -----

#1 menukadevinda  Icon User is offline

  • D.I.C Regular

Reputation: -7
  • View blog
  • Posts: 470
  • Joined: 14-April 11

condinter set rules method issu + cant use together language

Posted 11 March 2012 - 09:14 PM

Hi all,

I have very big problem in codeinter framework. I used it to my web site and I found this difficulty.
here is the code I used to validate password forms for changing password.
 public function check_passwordUser() {
        $this->load->library('form_validation');
        $this->load->model('user_model');
        $val = $this->user_model->checkPassword();
        if ($val == true) {
            return TRUE;
        } else {
            $this->form_validation->set_message('check_passwordUser', 'The %s is not correct');
            return FALSE;
        }
    }

    public function changePassword() {

        if ($this->input->post('submit') == FALSE) {
            $this->load->library('form_validation');

            $this->form_validation->set_rules('currentPassword', 'Current password', 'trim|required|min_length[4]|max_length[32]|callback_check_passwordUser');
            $this->form_validation->set_rules('newPassword', 'user new password', 'trim|required|min_length[4]|max_length[32]');
            $this->form_validation->set_rules('confirmPassword', 'confirm new Password', 'trim|required|matches[newPassword]');


            $this->load->model('user_model');
            if ($this->form_validation->run() == TRUE ) {


                $this->user_model->saveNewPassword();
                $data['userlevel'] = '4';
                $data['main_content'] = 'user/updateSuccess';
                $this->load->view('layout', $data);
            } else {
                $data['userlevel'] = '4';
                    $data['tab'] = 'tab1';
                $data['main_content'] = 'user/controleView';
                 $data['query'] = $this->user_model->adminget_users(); //fecth data from model
                $this->load->view('layout', $data);
            }
        }
    }



I used language files in my site. English and DUTCH. Now the problem is when validation is done it shows message from only English language. It is done by the frame work using set_rules methode.

so now my customer wants the validation from DUtch language too. I am stuck there , can anybody help. plz.

thx in advance..........

Is This A Good Question/Topic? 0
  • +

Page 1 of 1