Skip to content

Commit

Permalink
Fix bug where other inputs would throw validation error when uploadin…
Browse files Browse the repository at this point in the history
…g files
  • Loading branch information
milewski committed Oct 6, 2019
1 parent 915a740 commit 647e997
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Http/Controllers/FilepondController.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Storage;
use Illuminate\Validation\ValidationException;
use Laravel\Nova\Http\Requests\NovaRequest;
Expand Down Expand Up @@ -35,7 +36,7 @@ public function process(Request $request)
$resourceClass = Nova::resourceForKey($resourceName);
$rules = $resourceClass::rulesForCreation(app(NovaRequest::class));

$this->validate($request, $rules);
$this->validate($request, Arr::only($rules, $request->input('attribute')));

} catch (ValidationException $exception) {

Expand Down

0 comments on commit 647e997

Please sign in to comment.