diff options
| author | Zephyrrus <[email protected]> | 2021-06-17 16:06:53 +0300 |
|---|---|---|
| committer | Zephyrrus <[email protected]> | 2021-06-17 16:06:53 +0300 |
| commit | 0cae7e9eda3b62c17cfa7ec620913f4a504bc5ee (patch) | |
| tree | 8573814b4c86f03390cf8e641a03bc8dc7572ec0 /src/api/structures/Setting.js | |
| parent | feat: show setting values on the settings page and implement sending to backe... (diff) | |
| download | host.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.js | 6 |
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 }) |