CodeIgniter Forums
Unable to extend the codeigniter Validation library ? Urgent attention required? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Unable to extend the codeigniter Validation library ? Urgent attention required? (/showthread.php?tid=27370)



Unable to extend the codeigniter Validation library ? Urgent attention required? - El Forum - 02-09-2010

[eluser]naveenscode[/eluser]
hi
i am using codeigniter for a while , at present i am working on a portal app , i have created two directories like admin & home under application folder, when i tried to extend the core library CI_Validation from the admin/library folder i got an error message like

Fatal error: Class 'CI_Form_validation' not found in /home/user/public_html/portal/system/application/admin/libraries/my_form_validation.php.

unable to resolve this issue .

my directory structure is as follows

system | index.php | admin.php | public
|
application--------
| |
home admin


Unable to extend the codeigniter Validation library ? Urgent attention required? - El Forum - 02-09-2010

[eluser]bretticus[/eluser]
Off the top of my head here...

Shouldn't your file be called MY_Form_validation.php as opposed to my_form_validation.php?


Oh, by the way...

Why admin/libraries instead of just libraries? Are you using modules?


Unable to extend the codeigniter Validation library ? Urgent attention required? - El Forum - 02-09-2010

[eluser]naveenscode[/eluser]
still i got the same error i have replicated the contents of application folder that's why admin/libraries.


Unable to extend the codeigniter Validation library ? Urgent attention required? - El Forum - 02-09-2010

[eluser]naveenscode[/eluser]
"Off the top of my head here…

Shouldn’t your file be called MY_Form_validation.php as opposed to my_form_validation.php?


Oh, by the way…

Why admin/libraries instead of just libraries? Are you using modules? "


thankyou for the quick reply , but still i am getting the same error Class "'CI_Form_validation' not found in"

my application folder contains two directories both having its own library, helper, config ..
1)admin
2)home

i am not using any modules or HMVC architecture.


Unable to extend the codeigniter Validation library ? Urgent attention required? - El Forum - 02-09-2010

[eluser]naveenscode[/eluser]
Running Multiple Applications with one CodeIgniter Installation
system/application/foo/
system/application/foo/config/
system/application/foo/controllers/
system/application/foo/errors/
system/application/foo/libraries/
system/application/foo/models/
system/application/foo/views/
system/application/bar/
system/application/bar/config/
system/application/bar/controllers/
system/application/bar/errors/
system/application/bar/libraries/
system/application/bar/models/
system/application/bar/views/

i am following the above directory structure.
why this error happened ?? Any IDEA ?


Unable to extend the codeigniter Validation library ? Urgent attention required? - El Forum - 02-09-2010

[eluser]bretticus[/eluser]
Did you change your index pages to look in the appropriate application directories?


Unable to extend the codeigniter Validation library ? Urgent attention required? - El Forum - 02-09-2010

[eluser]tomcode[/eluser]
How do You load the form_validation ?

It looks like You do :

Code:
$this->load->library('my_form_validation'); //WRONG !!

if so, here's the right code :
Code:
$this->load->library('form_validation'); // RIGHT