unfix bug in validator, heh.

This commit is contained in:
Taylor Otwell 2012-01-31 14:21:59 -06:00
parent 62856a15ce
commit 5a6f2f888d
1 changed files with 3 additions and 1 deletions

View File

@ -427,7 +427,9 @@ protected function validate_unique($attribute, $value, $parameters)
// fine for the given ID to exist in the table.
if (isset($parameters[2]))
{
$query->where($attribute, '<>', $parameters[2]);
$id = (isset($parameters[3])) ? $parameters[3] : 'id';
$query->where($id, '<>', $parameters[2]);
}
return $query->count() == 0;