Welcome Guest, Not a member yet? Register   Sign In
validation or form_validation, Whats the difference
#1

[eluser]glasses092[/eluser]
Hi everyone,

I am just getting started with CodeIgniter and am wondering what is the difference between these 2 libraries:

Code:
$this->load->library('validation');
$this->load->library('form_validation');

In some forum posts people use the first one and in other posts the other one is used???

Are they the same thing?
What one should I use?

Thanks,

Martin
#2

[eluser]jedd[/eluser]
Hi glasses092, and welcome to the CI forums.

[quote author="glasses092" date="1243650952"]
Are they the same thing?
[/quote]


From: [url="http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html"]http://ellislab.com/codeigniter/user-guide/libraries/form_validation.html[/url]
Quote:As of CodeIgniter 1.7.0, this Form Validation class supercedes the old Validation class, which is now deprecated.
#3

[eluser]glasses092[/eluser]
Thanks Jedd,

So $this->load->library('validation') == OLD && $this->load->library('form_validation') == NEWEST and the one I should be using?

I was thinking it was another validation library used for db other validation
#4

[eluser]jedd[/eluser]
Quote:So $this->load->library('validation') == OLD && $this->load->library('form_validation') == NEWEST and the one I should be using?

That sounds about right.

Quote:I was thinking it was another validation library used for db other validation

Oh, for database validation you're on your own. Wink




Theme © iAndrew 2016 - Forum software by © MyBB