Skip to content

A free open source IT asset/license management system

Switch to older style rules for consistency

snipeb06c58fe7b08
diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php
index debd9d680d..33a1c6a570 100755
--- a/app/Models/Accessory.php
+++ b/app/Models/Accessory.php
@@ -66,7 +66,7 @@ class Accessory extends SnipeModel
'company_id' => 'integer|nullable',
'location_id' => 'exists:locations,id|nullable|fmcs_location',
'min_amt' => 'integer|min:0|nullable',
- 'purchase_cost' => ['nullable', 'numeric', 'gte:0', 'max:99999999999999999.99'],
+ 'purchase_cost' => 'numeric|nullable|gte:0|max:99999999999999999.99',
'purchase_date' => 'date_format:Y-m-d|nullable',
];
diff --git a/app/Models/Component.php b/app/Models/Component.php
index aabb4c9ccc..09ca41830e 100644
--- a/app/Models/Component.php
+++ b/app/Models/Component.php
@@ -43,7 +43,7 @@ class Component extends SnipeModel
'location_id' => 'exists:locations,id|nullable|fmcs_location',
'min_amt' => 'integer|min:0|nullable',
'purchase_date' => 'date_format:Y-m-d|nullable',
- 'purchase_cost' => ['nullable', 'numeric', 'gte:0', 'max:99999999999999999.99'],
+ 'purchase_cost' => 'numeric|nullable|gte:0|max:99999999999999999.99',
'manufacturer_id' => 'integer|exists:manufacturers,id|nullable',
];
diff --git a/app/Models/Consumable.php b/app/Models/Consumable.php
index 386e1e05d2..c7cdff0fe3 100644
--- a/app/Models/Consumable.php
+++ b/app/Models/Consumable.php
@@ -47,7 +47,7 @@ class Consumable extends SnipeModel
'company_id' => 'integer|nullable',
'location_id' => 'exists:locations,id|nullable|fmcs_location',
'min_amt' => 'integer|min:0|max:99999|nullable',
- 'purchase_cost' => ['nullable', 'numeric', 'gte:0', 'max:99999999999999999.99'],
+ 'purchase_cost' => 'numeric|nullable|gte:0|max:99999999999999999.99',
'purchase_date' => 'date_format:Y-m-d|nullable',
];
diff --git a/app/Models/License.php b/app/Models/License.php
index 7aa33ac63d..ddcac30d4c 100755
--- a/app/Models/License.php
+++ b/app/Models/License.php
@@ -51,7 +51,7 @@ class License extends Depreciable
'notes' => 'string|nullable',
'category_id' => 'required|exists:categories,id',
'company_id' => 'integer|nullable',
- 'purchase_cost' => ['nullable', 'numeric', 'gte:0', 'max:99999999999999999.99'],
+ 'purchase_cost' => 'numeric|nullable|gte:0|max:99999999999999999.99',
'purchase_date' => 'date_format:Y-m-d|nullable|max:10|required_with:depreciation_id',
'expiration_date' => 'date_format:Y-m-d|nullable|max:10',
'termination_date' => 'date_format:Y-m-d|nullable|max:10',
diff --git a/app/Models/Maintenance.php b/app/Models/Maintenance.php
index c5f975c07f..942fdb122a 100644
--- a/app/Models/Maintenance.php
+++ b/app/Models/Maintenance.php
@@ -37,7 +37,7 @@ class Maintenance extends SnipeModel implements ICompanyableChild
'start_date' => 'required|date_format:Y-m-d',
'completion_date' => 'date_format:Y-m-d|nullable|after_or_equal:start_date',
'notes' => 'string|nullable',
- 'cost' => ['nullable', 'numeric', 'gte:0', 'max:99999999999999999.99'],
+ 'cost' => 'numeric|nullable|gte:0|max:99999999999999999.99',
];