isMethod('post')) return []; $o = $this->route('o'); return [ 'name' => 'required|max:8|regex:/^[a-z-_~]{1,8}$/|unique:domains,name,'.($o->exists ? $o->id : 0), 'dnsdomain' => 'nullable|regex:/^(?!:\/\/)(?=.{1,255}$)((.{1,63}\.){1,127}(?![0-9]*$)[a-z0-9-]+\.?)$/i|unique:domains,dnsdomain,'.($o->exists ? $o->id : NULL), 'active' => 'required|boolean', 'public' => 'required|boolean', 'accept_app' => 'required|boolean', 'flatten' => 'nullable|boolean', 'nodestatus_id' => [ 'nullable', Rule::exists(Echoarea::class,'id'), Rule::in($o->echoareas->pluck('id')), ] ]; } }