fix bug in validation unique method.

This commit is contained in:
Taylor Otwell 2012-01-31 10:22:26 -06:00
parent 224b9eadd2
commit fd446aec62
1 changed files with 1 additions and 1 deletions

View File

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