diff --git a/dashboard/src/components/BackupSiteContentDialog.vue b/dashboard/src/components/BackupSiteContentDialog.vue index fe1bfb197..76f3e2eea 100644 --- a/dashboard/src/components/BackupSiteContentDialog.vue +++ b/dashboard/src/components/BackupSiteContentDialog.vue @@ -35,8 +35,20 @@ async function onSubmit() { if (includeExclude.value === 'everything') { contents = null; } else if (includeExclude.value === 'exclude') { + if (contentExclude.value.length === 0) { + formError.value.includeExclude = 'Exclude at least one content item or select Everything'; + busy.value = false; + return; + } + contents = { exclude: contentExclude.value }; - } else if (includeExclude.value === 'include' && contentInclude.value.length) { + } else if (includeExclude.value === 'include') { + if (contentInclude.value.length === 0) { + formError.value.includeExclude = 'Include at least one content item'; + busy.value = false; + return; + } + contents = { include: contentInclude.value }; } @@ -121,12 +133,13 @@ defineExpose({
{{ $t('backups.configureBackupStorage.backupContents.description') }}
+
{{ formError.includeExclude }}
- + - +