Skip to content

Commit

Permalink
[5.2] Add getValidationData method to FormRequest (#13914)
Browse files Browse the repository at this point in the history
* add getValidationData method to FormRequest

* fix naming
  • Loading branch information
n7olkachev authored and taylorotwell committed Jun 17, 2016
1 parent 6117a64 commit e97e151
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Illuminate/Foundation/Http/FormRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,20 @@ protected function getValidatorInstance()
}

return $factory->make(
$this->all(), $this->container->call([$this, 'rules']), $this->messages(), $this->attributes()
$this->validationData(), $this->container->call([$this, 'rules']), $this->messages(), $this->attributes()
);
}

/**
* Get validation data from request.
*
* @return array
*/
protected function validationData()
{
return $this->all();
}

/**
* Handle a failed validation attempt.
*
Expand Down

0 comments on commit e97e151

Please sign in to comment.