From 69da49d71af535fc2235f43f066f539dc4ea545d Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 4 Feb 2022 12:28:31 +0100 Subject: [PATCH] allowing shorthand hex --- backend/api/schemas/config-schema.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/api/schemas/config-schema.js b/backend/api/schemas/config-schema.js index 172c883af..412f68d5c 100644 --- a/backend/api/schemas/config-schema.js +++ b/backend/api/schemas/config-schema.js @@ -16,7 +16,7 @@ const CONFIG_SCHEMA = joi.object({ customTheme: joi.boolean(), customThemeColors: joi .array() - .items(joi.string().pattern(/^#[A-Fa-f0-9]{6}$/)) + .items(joi.string().pattern(/^#([\da-f]{3}){1,2}$/i)) .length(9), favThemes: joi.array().items(joi.string()), showKeyTips: joi.boolean(),