diff --git a/src/Illuminate/Validation/Validator.php b/src/Illuminate/Validation/Validator.php index 9eb1a3896c4d..3bae66a36bca 100755 --- a/src/Illuminate/Validation/Validator.php +++ b/src/Illuminate/Validation/Validator.php @@ -267,6 +267,8 @@ public function passes() $this->distinctValues = []; + $this->failedRules = []; + // We'll spin through each rule, validating the attributes attached to that // rule. Any error messages will be added to the containers with each of // the other error messages, returning true if we don't have messages. diff --git a/tests/Validation/ValidationValidatorTest.php b/tests/Validation/ValidationValidatorTest.php index 3bdc082a9350..1d21dadedcc7 100755 --- a/tests/Validation/ValidationValidatorTest.php +++ b/tests/Validation/ValidationValidatorTest.php @@ -4413,6 +4413,14 @@ public function testValidatedNotValidateTwiceData() $this->assertEquals(1, $validateCount); } + public function testMultiplePassesCalls() + { + $trans = $this->getIlluminateArrayTranslator(); + $v = new Validator($trans, [], ['foo' => 'string|required']); + $this->assertFalse($v->passes()); + $this->assertFalse($v->passes()); + } + /** * @dataProvider validUuidList */