CodeIgniter Forums
a problem after upgrade from 1.7.2 to 2.0 - 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: a problem after upgrade from 1.7.2 to 2.0 (/showthread.php?tid=34786)



a problem after upgrade from 1.7.2 to 2.0 - El Forum - 10-09-2010

[eluser]Ali Fattahi[/eluser]
Hi Everyone
i have upgraded From 1.7.2 to 2.0 but i got an error in my project
the Error is :
Code:
An Error Was Encountered

Unable to load the requested class: validation

How Can i solve this problem ?


a problem after upgrade from 1.7.2 to 2.0 - El Forum - 10-09-2010

[eluser]cahva[/eluser]
Validation class has been deprecated since 1.7.0 and you should not have used it anymore in 1.7.2. Validation class was replaced with form_validation class. The old validation class is now removed from CI 2.0.

This is mentioned also in 1.7.2 docs. Read the first note in the userguide for form_validation class.

I dont remember how different the 2 classes were. It could be just a rename of the class for something more suitable. If it was just that, you could get away with by just renaming every instance of $this->validation to $this->form_validation and library load to $this->load->library('form_validation');