2013-01-06 6 views
0

은 다음과 같습니다 : 그때 내가 같이로드해야한다는 선가사용자 정의 된답니다 설정

$form_registration = array(
     array(
      'field' => 'language', 
      'label' => 'language', 
      'rules' => 'required|min_length[5]|max_length[12]' 
     ), 
     array(
      'field' => 'email', 
      'label' => 'email', 
      'rules' => 'required|valid_email' 
     )); 

(짧은 버전) 양식 유효성 검사기의 경우

$this->ci->load->config('validation_rules', TRUE); 
$this->form_validation->set_rules($form_registration); 

그러나 오류가 발생 했습니까? documentation에서

Fatal error: Call to a member function config() on a non-object in 

답변

0

: 이 오류입니다

Note: If you do create your own config files use the same format as the primary one, storing your items in an array called $config. CodeIgniter will intelligently manage these files so there will be no conflict even though the array has the same name (assuming an array index is not named the same as another).

것은 $의 설정 배열 내부에 배열을 포장하려고