Add validation around dates

This commit is contained in:
Marcus Moore
2024-04-10 14:02:25 -07:00
parent d371d14c1f
commit 6d572424ac
2 changed files with 20 additions and 2 deletions
@@ -27,6 +27,14 @@ class AssetCheckoutRequest extends Request
'assigned_location' => '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' => [
'nullable',
'date',
],
'expected_checkin' => [
'nullable',
'date'
],
];
return $rules;