Skip to content

Commit 02fa7da

Browse files
committed
Require assigned_x to be integer on asset model
1 parent 2a2acf6 commit 02fa7da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/Models/Asset.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,9 @@ public function declinedCheckout(User $declinedBy, $signature)
122122
'assigned_to' => ['nullable', 'integer', 'required_with:assigned_type'],
123123
'assigned_type' => ['nullable', 'required_with:assigned_to', 'in:'.User::class.",".Location::class.",".Asset::class],
124124
'requestable' => ['nullable', 'boolean'],
125-
'assigned_user' => ['nullable', 'exists:users,id,deleted_at,NULL'],
126-
'assigned_location' => ['nullable', 'exists:locations,id,deleted_at,NULL', 'fmcs_location'],
127-
'assigned_asset' => ['nullable', 'exists:assets,id,deleted_at,NULL']
125+
'assigned_user' => ['integer', 'nullable', 'exists:users,id,deleted_at,NULL'],
126+
'assigned_location' => ['integer', 'nullable', 'exists:locations,id,deleted_at,NULL', 'fmcs_location'],
127+
'assigned_asset' => ['integer', 'nullable', 'exists:assets,id,deleted_at,NULL']
128128
];
129129

130130

0 commit comments

Comments
 (0)