From f922b2fd7072ace8211467e3627f2a44a5c09fe3 Mon Sep 17 00:00:00 2001 From: Christopher Ng Date: Thu, 11 Aug 2022 05:54:08 +0000 Subject: Remake locale saving with Vue Signed-off-by: Christopher Ng --- apps/settings/src/utils/validate.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'apps/settings/src/utils') 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 @@ -74,6 +74,18 @@ export function validateLanguage(input) { && input.name !== undefined } +/** + * 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 * -- cgit v1.2.3