From 3badb895b0cf1d328de12d3878b4e422dfde01c4 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sat, 14 Aug 2021 23:52:39 +1000 Subject: [PATCH] Filearea validation fixes --- app/Http/Controllers/EchoareaController.php | 1 - app/Http/Controllers/FileareaController.php | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Http/Controllers/EchoareaController.php b/app/Http/Controllers/EchoareaController.php index 798dd24..1e38076 100644 --- a/app/Http/Controllers/EchoareaController.php +++ b/app/Http/Controllers/EchoareaController.php @@ -22,7 +22,6 @@ class EchoareaController extends Controller $this->authorize('admin',$o); $request->validate([ - // http://ftsc.org/docs/old/fsp-1028.002 'domain_id' => 'required|exists:domains,id', 'name' => 'required|min:4|max:35|regex:/^[a-zA-Z-_~]{4,}$/|unique:echoareas,name,'.($o->exists ? $o->id : 0), 'description' => 'required', diff --git a/app/Http/Controllers/FileareaController.php b/app/Http/Controllers/FileareaController.php index e06b376..44c273b 100644 --- a/app/Http/Controllers/FileareaController.php +++ b/app/Http/Controllers/FileareaController.php @@ -21,9 +21,8 @@ class FileareaController extends Controller $this->authorize('admin',$o); $request->validate([ - // http://ftsc.org/docs/old/fsp-1028.002 'domain_id' => 'required|exists:domains,id', - 'name' => 'required|max:35|regex:/^[a-zA-Z-_~]{1,8}$/|unique:echoareas,name,'.($o->exists ? $o->id : 0), + 'name' => 'required|min:4|max:35|regex:/^[a-zA-Z-_~]{4,}$/|unique:fileareas,name,'.($o->exists ? $o->id : 0), 'description' => 'required', 'active' => 'required|boolean', 'public' => 'required|boolean',