Skip to content

Commit

Permalink
Reset errors prior to validation
Browse files Browse the repository at this point in the history
  • Loading branch information
erayd committed Mar 16, 2017
1 parent 3dba977 commit cd113f9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/JsonSchema/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public function validate(&$value, $schema = null, $checkMode = null)
$this->factory->setConfig($checkMode);
}

$this->reset();

$validator = $this->factory->createInstanceFor('schema');
$validator->check($value, $schema);

Expand Down

0 comments on commit cd113f9

Please sign in to comment.