]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/BookshelfController.php
New translations entities.php (Hebrew)
[bookstack] / app / Http / Controllers / BookshelfController.php
index 2f966beed11cee6332549ae66b1f2f61e7ce1c24..a294bf7318c2a35a44d42ff3772b15f900a5123d 100644 (file)
@@ -87,6 +87,7 @@ class BookshelfController extends Controller
             'name'        => ['required', 'string', 'max:255'],
             'description' => ['string', 'max:1000'],
             'image'       => array_merge(['nullable'], $this->getImageValidationRules()),
+            'tags'        => ['array'],
         ]);
 
         $bookIds = explode(',', $request->get('books', ''));
@@ -163,11 +164,12 @@ class BookshelfController extends Controller
             'name'        => ['required', 'string', 'max:255'],
             'description' => ['string', 'max:1000'],
             'image'       => array_merge(['nullable'], $this->getImageValidationRules()),
+            'tags'        => ['array'],
         ]);
 
         if ($request->has('image_reset')) {
             $validated['image'] = null;
-        } else if (array_key_exists('image', $validated) && is_null($validated['image'])) {
+        } elseif (array_key_exists('image', $validated) && is_null($validated['image'])) {
             unset($validated['image']);
         }