I am working on a CMS backend,and I use Codeigniter to help with the development.

So, I am working on a user table. For example, I allow the backend admin to insert, update the user info.

First there is a table of the user, for each row there is an "edit" button. After clicking on the "edit" button, there is a form for that particular user.

e.g.

```
UserName: Mr. ABC
Email: abc@a.com
Password: 1234

```

Since I need to ensure the username is unique and email is unique, I need to use isUnique validation

However, the problem is, how to handle the case, **"only the user modify the data, then add the is Unique rule"**? Because if I don't change the username, then I will pass the original name to check , and it can not pass the is Unique check , thanks

```
$this->form_validation->set_rules('name', 'Username', 'trim|required|min_length[4]|is_unique[admin.username]');   

```