Although the ActionRequest::validated method accepts the $key and $default parameters (for FormRequest compatibility), these parameters are not used as implemented in Laravel (#36807).
This PR fixes that.
Previous Behavior:
public function handle(ActionRequest $request) {
$validated = $request->validated(); // Returns an array
$password = $request->validated('password'); // Still returns an array
}
New Behavior:
public function handle(ActionRequest $request) {
$validated = $request->validated(); // Returns an array
$password = $request->validated('password'); // Still returns the validated `password` field's value
}
Although the
ActionRequest::validated
method accepts the$key
and$default
parameters (forFormRequest
compatibility), these parameters are not used as implemented in Laravel (#36807).This PR fixes that.
Previous Behavior:
New Behavior: