0

i've a file @ /config/form_validation.php
i've another file @ /config/ion_auth.php

i tried to get the 'ion_auth data' in form_validation but failed:

'rules'=>'required|min_length['.$this->config->item('min_password_length', 'ion_auth').']' 

error Message: Undefined property: CI_Loader::$config

If i change it to this, all works well.

'rules'=>'required|min_length[3]' 

It seems that i cannot call the data from another config file at the current config file.
How to overcome this problem or is this a system limitation?

1 Answer 1

1

it seems you create form at wrong place, try to get main controller first:

 $CI =$ get_instence();
'rules'=>'required|min_length['.$CI->config->item('min_password_length', 'ion_auth').']'
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks Charlie, solved by doing your way: $CI =& get_instance();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.