]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Api/BookshelfApiController.php
Fixed occurances of altered titles in search results
[bookstack] / app / Http / Controllers / Api / BookshelfApiController.php
index c29e5b0ae4c2d656843a6789503b619a278431aa..de7284e61562c14391b3658c3f96dc950e42f13d 100644 (file)
@@ -18,14 +18,14 @@ class BookshelfApiController extends ApiController
 
     protected $rules = [
         'create' => [
-            'name'        => 'required|string|max:255',
-            'description' => 'string|max:1000',
-            'books'       => 'array',
+            'name'        => ['required', 'string', 'max:255'],
+            'description' => ['string', 'max:1000'],
+            'books'       => ['array'],
         ],
         'update' => [
-            'name'        => 'string|min:1|max:255',
-            'description' => 'string|max:1000',
-            'books'       => 'array',
+            'name'        => ['string', 'min:1', 'max:255'],
+            'description' => ['string', 'max:1000'],
+            'books'       => ['array'],
         ],
     ];