M3 Integration fixes
This commit is contained in:
@@ -23,6 +23,8 @@ class StoreDocumentationDocumentRequest extends FormRequest
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
$maxUploadKb = min(max((int) config('documentation.max_upload_kb', 10240), 1), 10240);
|
||||
|
||||
return [
|
||||
'documentation_category_id' => ['nullable', 'integer', 'exists:documentation_categories,id'],
|
||||
'title' => ['required', 'string', 'max:220'],
|
||||
@@ -33,9 +35,9 @@ class StoreDocumentationDocumentRequest extends FormRequest
|
||||
'is_featured' => ['nullable', 'boolean'],
|
||||
'version' => ['required', 'string', 'max:50'],
|
||||
'reference' => ['nullable', 'string', 'max:100'],
|
||||
'attachment' => ['nullable', 'file', 'max:' . config('documentation.max_upload_kb', 20480), 'mimes:' . implode(',', config('documentation.allowed_upload_mimes', []))],
|
||||
'attachment' => ['nullable', 'file', 'max:' . $maxUploadKb, 'mimes:' . implode(',', config('documentation.allowed_upload_mimes', []))],
|
||||
'attachments' => ['nullable', 'array'],
|
||||
'attachments.*' => ['file', 'max:' . config('documentation.max_upload_kb', 20480), 'mimes:' . implode(',', config('documentation.allowed_upload_mimes', []))],
|
||||
'attachments.*' => ['file', 'max:' . $maxUploadKb, 'mimes:' . implode(',', config('documentation.allowed_upload_mimes', []))],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user