Skip to content

Commit

Permalink
add model field to validator for access model in custom validators
Browse files Browse the repository at this point in the history
  • Loading branch information
ananevam committed Nov 26, 2015
1 parent 602e169 commit 36f9968
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/WaveModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,7 @@ public function isModelValid(){
$attrs,
$rules
);
$validator->model = $this;
if ($validator->fails()){
$this->errors = $validator->messages()->getMessages();
return false;
Expand Down

0 comments on commit 36f9968

Please sign in to comment.