From a397002889c67f59ebe9a5abb7e64c78af019db8 Mon Sep 17 00:00:00 2001 From: Catalin Pit Date: Thu, 16 Jul 2026 14:33:01 +0300 Subject: [PATCH] chore: display errors for each custom document upload --- apps/remix/app/components/dialogs/template-use-dialog.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/remix/app/components/dialogs/template-use-dialog.tsx b/apps/remix/app/components/dialogs/template-use-dialog.tsx index da801bef4..ec5f68dcf 100644 --- a/apps/remix/app/components/dialogs/template-use-dialog.tsx +++ b/apps/remix/app/components/dialogs/template-use-dialog.tsx @@ -635,7 +635,7 @@ export function TemplateUseDialog({ } if (file.type !== 'application/pdf') { - form.setError('customDocumentData', { + form.setError(`customDocumentData.${i}.data`, { type: 'manual', message: _(msg`Please select a PDF file`), }); @@ -644,7 +644,7 @@ export function TemplateUseDialog({ } if (file.size > APP_DOCUMENT_UPLOAD_SIZE_LIMIT * 1024 * 1024) { - form.setError('customDocumentData', { + form.setError(`customDocumentData.${i}.data`, { type: 'manual', message: _( msg`File size exceeds the limit of ${APP_DOCUMENT_UPLOAD_SIZE_LIMIT} MB`, @@ -659,7 +659,7 @@ export function TemplateUseDialog({ `customDocumentData.${i}.uploadSequence`, ++uploadSequenceRef.current, ); - form.clearErrors('customDocumentData'); + form.clearErrors(`customDocumentData.${i}.data`); }} />