From 9cbd9b23d0dd2a7c6bf60660783130f4b600e5d1 Mon Sep 17 00:00:00 2001 From: Ryan Wang Date: Thu, 10 Oct 2024 11:05:00 +0800 Subject: [PATCH] fix: username length validation in user creation form is not working (#6806) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /area ui /kind bug /milestone 2.20.x #### What this PR does / why we need it: 修复创建用户表单的用户名长度校验不生效的问题。 #### Does this PR introduce a user-facing change? ```release-note 修复创建用户表单的用户名长度校验不生效的问题。 ``` --- .../modules/system/users/components/UserCreationModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/console-src/modules/system/users/components/UserCreationModal.vue b/ui/console-src/modules/system/users/components/UserCreationModal.vue index 5401b0859..37a7e4f05 100644 --- a/ui/console-src/modules/system/users/components/UserCreationModal.vue +++ b/ui/console-src/modules/system/users/components/UserCreationModal.vue @@ -84,7 +84,7 @@ const handleCreateUser = async () => { name="name" :validation="[ ['required'], - ['length:0,63'], + ['length', 0, 63], [ 'matches', /^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/,