Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

Better validation

Blue Mouse318add9c0a1f
diff --git a/backend/apps/cloud/src/project/dto/project.dto.ts b/backend/apps/cloud/src/project/dto/project.dto.ts
index 1496aaef2..9d67252f9 100644
--- a/backend/apps/cloud/src/project/dto/project.dto.ts
+++ b/backend/apps/cloud/src/project/dto/project.dto.ts
@@ -96,6 +96,7 @@ export class ProjectDTO {
'Brand keywords used to classify search queries as branded vs non-branded traffic.',
})
@IsOptional()
+ @ValidateIf((o) => o.brandKeywords !== null && o.brandKeywords !== undefined)
@IsArray()
@IsString({ each: true })
brandKeywords?: string[] | null