I am using Ver: 2.1.0 and I am having the following issue when I use is_unique within my form_validation function:
$this->form_validation->set_rules('userName', 'User Name', 'trim|required|is_unique["users.userName"]|xss_clean|');
I am getting the following error:

But my table structure is correct and the db is connecting:

Your table name is wrong. You are quering “users table instead of users which is caused by is_unique[“users.userName”] use is_unique[users.userName] instead.