$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')); } } }