aboutsummaryrefslogtreecommitdiff
path: root/src/api/structures/Setting.js
diff options
context:
space:
mode:
authorZephyrrus <[email protected]>2021-06-17 16:06:53 +0300
committerZephyrrus <[email protected]>2021-06-17 16:06:53 +0300
commit0cae7e9eda3b62c17cfa7ec620913f4a504bc5ee (patch)
tree8573814b4c86f03390cf8e641a03bc8dc7572ec0 /src/api/structures/Setting.js
parentfeat: show setting values on the settings page and implement sending to backe... (diff)
downloadhost.fuwn.me-0cae7e9eda3b62c17cfa7ec620913f4a504bc5ee.tar.xz
host.fuwn.me-0cae7e9eda3b62c17cfa7ec620913f4a504bc5ee.zip
feat: show validation errors from joi on the frontend
Diffstat (limited to 'src/api/structures/Setting.js')
-rw-r--r--src/api/structures/Setting.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/api/structures/Setting.js b/src/api/structures/Setting.js
index ff98339..7650ccb 100644
--- a/src/api/structures/Setting.js
+++ b/src/api/structures/Setting.js
@@ -116,9 +116,9 @@ const schema = Joi.object({
.description('Allows people to create new accounts'),
// Social and sharing
- metaThemeColor: Joi.string().hex().min(3)
- .max(6)
- .default('20222b')
+ metaThemeColor: Joi.string().pattern(/^#([0-9a-f]{6}|[0-9a-f]{3})$/i).min(4)
+ .max(7)
+ .default('#20222b')
.meta({
section: Sections.SOCIAL_AND_SHARING
})