diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 5c5d861ed3..5dc7b71497 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -91,28 +91,28 @@ class Asset extends Depreciable ]; protected $rules = [ - 'name' => 'nullable|max:255', - 'model_id' => 'required|integer|exists:models,id,deleted_at,NULL|not_array', - 'status_id' => 'required|integer|exists:status_labels,id', - 'company_id' => 'nullable|integer|exists:companies,id', - 'warranty_months' => 'nullable|numeric|digits_between:0,240', - 'physical' => 'nullable|boolean', + 'model_id' => 'required|integer|exists:models,id,deleted_at,NULL|not_array', + 'status_id' => 'required|integer|exists:status_labels,id', + 'name' => 'nullable|max:255', + 'company_id' => 'nullable|integer|exists:companies,id', + 'warranty_months' => 'nullable|numeric|digits_between:0,240', + 'physical' => 'nullable|boolean', 'last_checkout' => 'nullable|date_format:Y-m-d H:i:s', 'expected_checkin' => 'nullable|date', - 'location_id' => 'nullable|exists:locations,id', - 'rtd_location_id' => 'nullable|exists:locations,id', - 'asset_tag' => 'required|min:1|max:255|unique_undeleted:assets,asset_tag|not_array', - 'purchase_date' => 'nullable|date|date_format:Y-m-d', - 'serial' => 'nullable|unique_undeleted:assets,serial', - 'purchase_cost' => 'nullable|numeric|gte:0', - 'supplier_id' => 'nullable|exists:suppliers,id', - 'asset_eol_date' => 'nullable|date', - 'eol_explicit' => 'nullable|boolean', - 'byod' => 'nullable|boolean', - 'order_number' => 'nullable|string|max:191', - 'notes' => 'nullable|string|max:65535', - 'assigned_to' => 'nullable|integer', - 'requestable' => 'nullable|boolean', + 'location_id' => 'nullable|exists:locations,id', + 'rtd_location_id' => 'nullable|exists:locations,id', + 'asset_tag' => 'required|min:1|max:255|unique_undeleted:assets,asset_tag|not_array', + 'purchase_date' => 'nullable|date|date_format:Y-m-d', + 'serial' => 'nullable|unique_undeleted:assets,serial', + 'purchase_cost' => 'nullable|numeric|gte:0', + 'supplier_id' => 'nullable|exists:suppliers,id', + 'asset_eol_date' => 'nullable|date', + 'eol_explicit' => 'nullable|boolean', + 'byod' => 'nullable|boolean', + 'order_number' => 'nullable|string|max:191', + 'notes' => 'nullable|string|max:65535', + 'assigned_to' => 'nullable|integer', + 'requestable' => 'nullable|boolean', ];