From bdc98359f27d207150bbace7f958754cf7b41e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20M=C3=BCller?= Date: Fri, 13 Sep 2024 12:38:48 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Check=20all=20inputs=20on=20acco?= =?UTF-8?q?unt=20settings=20at=20the=20same=20time?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/components/SettingsAccount.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/SettingsAccount.vue b/frontend/src/components/SettingsAccount.vue index 7c1d2f3a..64914e7b 100644 --- a/frontend/src/components/SettingsAccount.vue +++ b/frontend/src/components/SettingsAccount.vue @@ -101,18 +101,22 @@ const updateUser = async () => { * If it didn't change, then just update the user immediately. */ const updateUserCheckForConfirmation = async () => { + errorUsername.value = null; + errorDisplayName.value = null; + // Validate username if (activeUsername.value === '') { errorUsername.value = t('validation.fieldIsRequired', { field: t('label.username') }); - return; } if (hasProfanity(activeUsername.value)) { errorUsername.value = t('validation.fieldContainsProfanity', { field: t('label.username') }); - return; } // Validate display name if (hasProfanity(activeDisplayName.value)) { errorDisplayName.value = t('validation.fieldContainsProfanity', { field: t('label.displayName') }); + } + + if (errorUsername.value || errorDisplayName.value) { return; }