Filearea validation fixes
This commit is contained in:
parent
34776b6639
commit
3badb895b0
@ -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',
|
||||||
|
@ -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',
|
||||||
|
Loading…
Reference in New Issue
Block a user