]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/CommentController.php
Added ability to escape role "External Auth ID" commas
[bookstack] / app / Http / Controllers / CommentController.php
index dfe468f5f6f0992f9ebe73d0639567e8dec40141..9804f6d39a0b077448a84a887b8563c6826a6047 100644 (file)
@@ -24,8 +24,8 @@ class CommentController extends Controller
     public function savePageComment(Request $request, int $pageId)
     {
         $this->validate($request, [
-            'text'      => 'required|string',
-            'parent_id' => 'nullable|integer',
+            'text'      => ['required', 'string'],
+            'parent_id' => ['nullable', 'integer'],
         ]);
 
         $page = Page::visible()->find($pageId);
@@ -53,7 +53,7 @@ class CommentController extends Controller
     public function update(Request $request, int $commentId)
     {
         $this->validate($request, [
-            'text' => 'required|string',
+            'text' => ['required', 'string'],
         ]);
 
         $comment = $this->commentRepo->getById($commentId);