From fd446aec624ff607e07c3d0f3aa38fbdfc40dd41 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 31 Jan 2012 10:22:26 -0600 Subject: [PATCH] fix bug in validation unique method. --- laravel/validator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;