diff --git a/src/Validator.php b/src/Validator.php index b24ce01..c3cb5e3 100644 --- a/src/Validator.php +++ b/src/Validator.php @@ -106,10 +106,11 @@ public function validate($closure = null) $this->isValidatedCalled = true; if($this->hasError()){ - $this->callback($closure); // save into a remembering variable ValidatorMethod::resolveFlash($this); + + $this->callback($closure); } return $this; @@ -124,11 +125,12 @@ public function validate($closure = null) public function save($closure) { if($this->isValidated()){ - $this->callback($closure); - + // save into a remembering variable ValidatorMethod::resolveFlash($this); - + + $this->callback($closure); + // delete csrf session token CsrfToken::unsetToken(); }