소스 검색

Update CollectionController, limit max title and description length

Daniel Supernault 2 년 전
부모
커밋
6e76cf4b68
1개의 변경된 파일4개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 4
      app/Http/Controllers/CollectionController.php

+ 4 - 4
app/Http/Controllers/CollectionController.php

@@ -65,8 +65,8 @@ class CollectionController extends Controller
     {
         abort_if(!Auth::check(), 403);
         $this->validate($request, [
-            'title'         => 'nullable',
-            'description'   => 'nullable',
+            'title'         => 'nullable|max:50',
+            'description'   => 'nullable|max:500',
             'visibility'    => 'nullable|string|in:public,private,draft'
         ]);
 
@@ -84,8 +84,8 @@ class CollectionController extends Controller
     {
         abort_if(!Auth::check(), 403);
         $this->validate($request, [
-            'title'         => 'nullable',
-            'description'   => 'nullable',
+            'title'         => 'nullable|max:50',
+            'description'   => 'nullable|max:500',
             'visibility'    => 'required|alpha|in:public,private,draft'
         ]);
         $profile = Auth::user()->profile;