aboutsummaryrefslogtreecommitdiffstats
path: root/apps/settings/src/utils
diff options
context:
space:
mode:
authorChristopher Ng <chrng8@gmail.com>2022-08-11 05:54:08 +0000
committerChristopher Ng <chrng8@gmail.com>2022-09-16 19:02:18 +0000
commitf922b2fd7072ace8211467e3627f2a44a5c09fe3 (patch)
treed218fb323c4445659576a70a5cfc8ea7af149a79 /apps/settings/src/utils
parentb9c002df0a3ab80c1612206cfb1f724d90e0da3a (diff)
downloadnextcloud-server-f922b2fd7072ace8211467e3627f2a44a5c09fe3.tar.gz
nextcloud-server-f922b2fd7072ace8211467e3627f2a44a5c09fe3.zip
Remake locale saving with Vue
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'apps/settings/src/utils')
-rw-r--r--apps/settings/src/utils/validate.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/settings/src/utils/validate.js b/apps/settings/src/utils/validate.js
index 7d0cf1d9e33..4ea95593fbc 100644
--- a/apps/settings/src/utils/validate.js
+++ b/apps/settings/src/utils/validate.js
@@ -75,6 +75,18 @@ export function validateLanguage(input) {
}
/**
+ * Validate the locale input
+ *
+ * @param {object} input the input
+ * @return {boolean}
+ */
+export function validateLocale(input) {
+ return input.code !== ''
+ && input.name !== ''
+ && input.name !== undefined
+}
+
+/**
* Validate boolean input
*
* @param {boolean} input the input