Filearea validation fixes

This commit is contained in:
Deon George 2021-08-14 23:52:39 +10:00
parent 34776b6639
commit 3badb895b0
2 changed files with 1 additions and 3 deletions

View File

@ -22,7 +22,6 @@ class EchoareaController extends Controller
$this->authorize('admin',$o); $this->authorize('admin',$o);
$request->validate([ $request->validate([
// http://ftsc.org/docs/old/fsp-1028.002
'domain_id' => 'required|exists:domains,id', '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), 'name' => 'required|min:4|max:35|regex:/^[a-zA-Z-_~]{4,}$/|unique:echoareas,name,'.($o->exists ? $o->id : 0),
'description' => 'required', 'description' => 'required',

View File

@ -21,9 +21,8 @@ class FileareaController extends Controller
$this->authorize('admin',$o); $this->authorize('admin',$o);
$request->validate([ $request->validate([
// http://ftsc.org/docs/old/fsp-1028.002
'domain_id' => 'required|exists:domains,id', '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', 'description' => 'required',
'active' => 'required|boolean', 'active' => 'required|boolean',
'public' => 'required|boolean', 'public' => 'required|boolean',