From 704ee5954160607ad0426565b5738c556ce7b3e4 Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 12 Jan 2017 02:19:36 -0800 Subject: [PATCH] WTF why is name required?? --- app/Http/Requests/AssetRequest.php | 2 +- app/Models/Asset.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Requests/AssetRequest.php b/app/Http/Requests/AssetRequest.php index a7035e1994..70d8756c75 100644 --- a/app/Http/Requests/AssetRequest.php +++ b/app/Http/Requests/AssetRequest.php @@ -26,7 +26,7 @@ class AssetRequest extends Request public function rules() { $rules = [ - 'name' => 'min:2|max:255', + 'name' => 'max:255|nullable', 'model_id' => 'required|integer', 'status_id' => 'required|integer', 'company_id' => 'integer|nullable', diff --git a/app/Models/Asset.php b/app/Models/Asset.php index 10336230d3..4f9e778f30 100644 --- a/app/Models/Asset.php +++ b/app/Models/Asset.php @@ -43,7 +43,7 @@ class Asset extends Depreciable use ValidatingTrait, UniqueUndeletedTrait; protected $rules = [ - 'name' => 'min:2|max:255', + 'name' => 'max:255|nullable', 'model_id' => 'required|integer', 'status_id' => 'required|integer', 'company_id' => 'integer|nullable',