Skip to content

Commit

Permalink
Merge branch 'extend-validation' of github.com:wintercms/storm into e…
Browse files Browse the repository at this point in the history
…xtend-validation
  • Loading branch information
mjauvin committed Mar 2, 2023
2 parents 114ec81 + e4aeca7 commit 72176b6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Database/Traits/Validation.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public function setValidationAttributeName($attr, $name)
*/
protected function getValidationAttributes()
{
$attributes = $this->getAttributes();
/**
* @event model.getValidationAttributes
* Called when fetching the model attributes to validate the model
Expand All @@ -125,8 +126,6 @@ protected function getValidationAttributes()
* });
*
*/

$attributes = $this->getAttributes();
if (($validationAttributes = $this->fireEvent('model.getValidationAttributes', [$attributes], true)) !== null) {
return $validationAttributes;
}
Expand Down

0 comments on commit 72176b6

Please sign in to comment.