EllisLab/CodeIgniter — Issue #724: is_unique validation not working
Author: champ4
Created: 2011-11-30 06:37:42+00:00
State: open

Hi,

I recently update my CodeIgniter from 2.0.2 to 2.1 because I need to use is_unique validation (from Form_validation.php), but is not working for me. The code:

Controller:
$this->form_validation->set_rules('email', 'E-mail', 'required|valid_email|is_unique[persona.email]');

View error msg:

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Usuarios::$db

Filename: libraries/Form_validation.php

Line Number: 954

Fatal error: Call to a member function limit() on a non-object in C:\xampp\htdocs\st\system\libraries\Form_validation.php on line 954

-----------

The problem is with the DB object. It seems that it not properly implemented on CI instance.

PHP Version: 5.3.0
Plataform: Windows