Welcome Guest, Not a member yet? Register   Sign In
Unable to extend the codeigniter Validation library ? Urgent attention required?
#1

[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
#2

[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?
#3

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

[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.
#5

[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 ?
#6

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

[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




Theme © iAndrew 2016 - Forum software by © MyBB