Attachments: Aligned attachment validation a little more

This commit is contained in:
Dan Brown
2026-04-12 15:29:00 +01:00
parent c7e2b487c1
commit 4feb50e7ee

View File

@@ -45,7 +45,7 @@ final class ZipExportAttachment extends ZipExportModel
$rules = [
'id' => ['nullable', 'int', $context->uniqueIdRule('attachment')],
'name' => ['required', 'string', 'min:1'],
'link' => ['required_without:file', 'nullable', 'string', 'safe_url'],
'link' => ['required_without:file', 'nullable', 'string', 'max:2000', 'safe_url'],
'file' => ['required_without:link', 'nullable', 'string', $context->fileReferenceRule()],
];