diff --git a/laravel/validator.php b/laravel/validator.php index 4cc65036..08668d75 100644 --- a/laravel/validator.php +++ b/laravel/validator.php @@ -427,7 +427,7 @@ protected function validate_unique($attribute, $value, $parameters) // fine for the given ID to exist in the table. if (isset($parameters[2])) { - $query->where('id', '<>', $parameters[2]); + $query->where($attribute, '<>', $parameters[2]); } return $query->count() == 0;