Skip to content

Commit

Permalink
Merge pull request #15892 from marcusmoore/bug/harden-checkout-valida…
Browse files Browse the repository at this point in the history
…tion

Hardened asset checkout validation by requiring integer
  • Loading branch information
snipe authored Nov 27, 2024
2 parents 2cb1b6d + fcbd5dc commit 46be1ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Requests/AssetCheckoutRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ public function rules()
$settings = \App\Models\Setting::getSettings();

$rules = [
'assigned_user' => 'required_without_all:assigned_asset,assigned_location',
'assigned_asset' => 'required_without_all:assigned_user,assigned_location',
'assigned_location' => 'required_without_all:assigned_user,assigned_asset',
'assigned_user' => 'integer|required_without_all:assigned_asset,assigned_location',
'assigned_asset' => 'integer|required_without_all:assigned_user,assigned_location',
'assigned_location' => 'integer|required_without_all:assigned_user,assigned_asset',
'status_id' => 'exists:status_labels,id,deployable,1',
'checkout_to_type' => 'required|in:asset,location,user',
'checkout_at' => [
Expand Down

0 comments on commit 46be1ad

Please sign in to comment.