-
- {{ message }}
+
+
+
+ {{ validation.message ? formatMessage(validation.message, validation.values) : undefined }}
+
@@ -20,16 +26,15 @@ interface ValidationCheck {
values?: Record
}
-const props = withDefaults(defineProps<{ check?: ValidationCheck | null }>(), {
+const props = withDefaults(defineProps<{ check?: ValidationCheck | ValidationCheck[] | null }>(), {
check: null,
})
const { formatMessage } = useVIntl()
-const icon = computed(() => (props.check?.severity === 'error' ? XCircleIcon : TriangleAlertIcon))
-
-const message = computed(() => {
- if (!props.check?.message) return undefined
- return formatMessage(props.check.message, props.check.values)
-})
+const validations = computed(() =>
+ (Array.isArray(props.check) ? props.check : props.check ? [props.check] : []).filter(
+ (validation) => validation.severity !== 'valid',
+ ),
+)
diff --git a/apps/frontend/src/components/ui/create/ProjectCreateModal.vue b/apps/frontend/src/components/ui/create/ProjectCreateModal.vue
index 3f47802433..99b1dc9975 100644
--- a/apps/frontend/src/components/ui/create/ProjectCreateModal.vue
+++ b/apps/frontend/src/components/ui/create/ProjectCreateModal.vue
@@ -339,7 +339,11 @@ const summaryValidation = useProjectSummaryValidation(description, name)
const disableCreate = computed(() => {
if (hasHitLimit.value) return true
- if (nameValidation.value || summaryValidation.value) return true
+ if (
+ nameValidation.value.some((validation) => validation.severity === 'error') ||
+ summaryValidation.value.some((validation) => validation.severity === 'error')
+ )
+ return true
if (!name.value.trim() || !slug.value.trim()) return true
if (!manualSlug.value && checkingSlugSuggestions.value) return true
if (!manualSlug.value && !slugSuggestions.value.includes(slug.value)) return true
diff --git a/apps/frontend/src/components/ui/moderation/ModerationProjectNags.vue b/apps/frontend/src/components/ui/moderation/ModerationProjectNags.vue
index fcdd9591c8..24f224fb58 100644
--- a/apps/frontend/src/components/ui/moderation/ModerationProjectNags.vue
+++ b/apps/frontend/src/components/ui/moderation/ModerationProjectNags.vue
@@ -32,51 +32,72 @@
-