diff --git a/src/Illuminate/Validation/Validator.php b/src/Illuminate/Validation/Validator.php index 98273ee2e76d..cfa7d74d51c4 100755 --- a/src/Illuminate/Validation/Validator.php +++ b/src/Illuminate/Validation/Validator.php @@ -1296,6 +1296,10 @@ protected function validateUnique($attribute, $value, $parameters) if (strtolower($id) == 'null') { $id = null; } + + if (filter_var($id, FILTER_VALIDATE_INT) !== false) { + $id = intval($id); + } } // The presence verifier is responsible for counting rows within this store