diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-08-11 05:54:08 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-09-16 19:02:18 +0000 |
commit | f922b2fd7072ace8211467e3627f2a44a5c09fe3 (patch) | |
tree | d218fb323c4445659576a70a5cfc8ea7af149a79 /apps/settings/src/utils | |
parent | b9c002df0a3ab80c1612206cfb1f724d90e0da3a (diff) | |
download | nextcloud-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.js | 12 |
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 |