From b455a5df49dbc42a15ad392304a31bcef280d4a7 Mon Sep 17 00:00:00 2001 From: Carlos Santos <4a.santos@gmail.com> Date: Tue, 30 Sep 2025 12:07:07 +0200 Subject: [PATCH] backend: update hex color schema to support 3/4 and 6/8 character formats. Supported alfa hex code --- .../middlewares/request-validators/room-validator.middleware.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/middlewares/request-validators/room-validator.middleware.ts b/backend/src/middlewares/request-validators/room-validator.middleware.ts index b32b478..6cca94a 100644 --- a/backend/src/middlewares/request-validators/room-validator.middleware.ts +++ b/backend/src/middlewares/request-validators/room-validator.middleware.ts @@ -92,7 +92,7 @@ const VirtualBackgroundConfigSchema: z.ZodType = z. const ThemeModeSchema: z.ZodType = z.enum([MeetRoomThemeMode.LIGHT, MeetRoomThemeMode.DARK]); -const hexColorSchema = z.string().regex(/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/, 'Must be a valid hex color code'); +const hexColorSchema = z.string().regex(/^#([0-9A-Fa-f]{8}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{4}|[0-9A-Fa-f]{3})$/, 'Must be a valid hex color code (with or without alpha)'); const RoomThemeSchema = z.object({ name: z