diff --git a/app/Models/Accessory.php b/app/Models/Accessory.php index 3fc4c5c9c6..fc1bb36ab4 100755 --- a/app/Models/Accessory.php +++ b/app/Models/Accessory.php @@ -62,7 +62,7 @@ class Accessory extends SnipeModel 'category_id' => 'required|integer|exists:categories,id', 'company_id' => 'integer|nullable', 'min_amt' => 'integer|min:0|nullable', - 'purchase_cost' => 'numeric|nullable|gte:0', + 'purchase_cost' => 'numeric|nullable|gte:0|max:9999999999999', 'purchase_date' => 'date_format:Y-m-d|nullable', ]; diff --git a/app/Models/Asset.php b/app/Models/Asset.php index bd0578fc2e..7301065712 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -112,7 +112,7 @@ class Asset extends Depreciable 'rtd_location_id' => ['nullable', 'exists:locations,id'], 'purchase_date' => ['nullable', 'date', 'date_format:Y-m-d'], 'serial' => ['nullable', 'unique_undeleted:assets,serial'], - 'purchase_cost' => ['nullable', 'numeric', 'gte:0'], + 'purchase_cost' => ['nullable', 'numeric', 'gte:0', 'max:9999999999999'], 'supplier_id' => ['nullable', 'exists:suppliers,id'], 'asset_eol_date' => ['nullable', 'date'], 'eol_explicit' => ['nullable', 'boolean'], diff --git a/app/Models/Component.php b/app/Models/Component.php index 7bba37ac12..761c76f097 100644 --- a/app/Models/Component.php +++ b/app/Models/Component.php @@ -30,14 +30,14 @@ class Component extends SnipeModel * Category validation rules */ public $rules = [ - 'name' => 'required|min:3|max:255', + 'name' => 'required|min:3|max:191', 'qty' => 'required|integer|min:1', 'category_id' => 'required|integer|exists:categories,id', 'supplier_id' => 'nullable|integer|exists:suppliers,id', 'company_id' => 'integer|nullable|exists:companies,id', 'min_amt' => 'integer|min:0|nullable', 'purchase_date' => 'date_format:Y-m-d|nullable', - 'purchase_cost' => 'numeric|nullable|gte:0', + 'purchase_cost' => 'numeric|nullable|gte:0|max:9999999999999', ]; /** diff --git a/app/Models/Consumable.php b/app/Models/Consumable.php index eb0acc8016..30161e8429 100644 --- a/app/Models/Consumable.php +++ b/app/Models/Consumable.php @@ -50,7 +50,7 @@ class Consumable extends SnipeModel 'category_id' => 'required|integer', 'company_id' => 'integer|nullable', 'min_amt' => 'integer|min:0|max:99999|nullable', - 'purchase_cost' => 'numeric|nullable|gte:0', + 'purchase_cost' => 'numeric|nullable|gte:0|max:9999999999999', 'purchase_date' => 'date_format:Y-m-d|nullable', ]; diff --git a/resources/views/components/checkout.blade.php b/resources/views/components/checkout.blade.php index 39890a1938..7b2b313ba6 100644 --- a/resources/views/components/checkout.blade.php +++ b/resources/views/components/checkout.blade.php @@ -33,7 +33,7 @@ {{ trans('general.qty') }}