Skip to content

Commit 543118c

Browse files
committed
Reset the validator when a new schema is loaded
1 parent db02b24 commit 543118c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
## [Unreleased]
2+
* Fixed: Issue when adding a new schema and not resetting the validator
23

34
## [2.0.0] - 2023-04-10
45
* Added: Major refactor for PHP 7.4 upwards

src/BaseDocument.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public function loadSchema($data): void
5050
{
5151
$loader = new Loader();
5252
$this->schema = $loader->getSchema($data);
53+
$this->validator = null;
5354
}
5455

5556
public function tidy(bool $order = false): void

0 commit comments

Comments
 (0)