mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Change component validator to the correct asset id we're passing in the API call
This commit is contained in:
parent
af86c6138d
commit
0a841ddbb8
|
@ -235,7 +235,7 @@ class ComponentsController extends Controller
|
||||||
$this->authorize('checkout', $component);
|
$this->authorize('checkout', $component);
|
||||||
|
|
||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'asset_id' => 'required|exists:assets,id',
|
'assigned_to' => 'required|exists:assets,id',
|
||||||
'assigned_qty' => "required|numeric|min:1|digits_between:1,".$component->numRemaining(),
|
'assigned_qty' => "required|numeric|min:1|digits_between:1,".$component->numRemaining(),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue