$value], [ 'attachment' => [ 'file', 'max:'.self::MAX_UPLOAD_KILOBYTES, 'mimetypes:'.implode(',', self::ALLOWED_MIME_TYPES), ], ], [ 'attachment.file' => 'Attachment upload failed. Try the file again or choose a different file.', 'attachment.max' => 'Attachments must be 200 MB or smaller.', 'attachment.mimetypes' => 'Unsupported attachment type. Upload media, PDF, text/data, Office, OpenDocument, or archive files.', ], ); if ($validator->fails()) { $fail($validator->errors()->first('attachment')); } } }