1
0
Fork 0
forked from mirror/pixelfed

Update StatusController

This commit is contained in:
Daniel Supernault 2018-09-23 17:08:17 -06:00
parent 6995872e31
commit d0cd22f5b4
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -85,7 +85,13 @@ class StatusController extends Controller
} }
$this->validate($request, [ $this->validate($request, [
'photo.*' => 'required|mimes:jpeg,png,gif|max:'.config('pixelfed.max_photo_size'), 'photo.*' => function() {
return [
'required',
'mimes:' . config('pixelfed.media_types'),
'max:' . config('pixelfed.max_photo_size'),
];
},
'caption' => 'string|max:'.config('pixelfed.max_caption_length'), 'caption' => 'string|max:'.config('pixelfed.max_caption_length'),
'cw' => 'nullable|string', 'cw' => 'nullable|string',
'filter_class' => 'nullable|string', 'filter_class' => 'nullable|string',