Skip to content

Commit

Permalink
Merge pull request #12 from ronanchilvers/validation-fixe
Browse files Browse the repository at this point in the history
Fix validation sceanrios for loaded models
  • Loading branch information
ronanchilvers authored Apr 16, 2023
2 parents d725dc1 + dc4d3a9 commit 8fbfb26
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/HasValidationTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public function saveWithValidation($scenario = 'default')
if ($this->useTimestamps()) {
$this->updateTimestamps();
}
if (false === $this->validate()) {
if (false === $this->validate($scenario)) {
return false;
}
if (true !== $this->persistUpdate()) {
Expand Down

0 comments on commit 8fbfb26

Please sign in to comment.