mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
core: prohibit rtl characters in displayName
This commit is contained in:
4 files changed
+34
-20
No files matched your search
@@ -366,6 +366,7 @@ function set(s: Setting, key: string, value: any) {
|
||||
if (s.family === 'setting_storage') return undefined;
|
||||
if (s.flag & setting.FLAG_DISABLED) return undefined;
|
||||
if ((s.flag & setting.FLAG_SECRET) && !value) return undefined;
|
||||
if (s.validation && !s.validation(value)) throw new ValidationError(key);
|
||||
if (s.type === 'boolean') {
|
||||
if (value === 'on') return true;
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user