EllisLab/CodeIgniter — Issue #855: Add unique validation to combined fields
Author: Dentxinho
Created: 2012-01-02 17:53:39+00:00
State: open

Could you add a form validation like `is_unique`, that validates combinations instead of only one field?
The code might be like:

```php
foreach ($somearr as $field => $str)
{
$fields[$field] = $str;
}
$query = $this->CI->db->limit(1)->get_where($table, $fields);
```

E.g: You could have a validation that checks for a combination of Name AND Email fields for its uniqueness.