mirror of https://github.com/halo-dev/halo
refactor: remove username input validation rule in user editing form (#4276)
#### What type of PR is this? /area console /kind improvement /milestone 2.8.x #### What this PR does / why we need it: 移除用户编辑表单中用户名的校验规则,在这个表单中,用户名本身就是不能修改的,所以不需要验证。移除之后还能够解决旧版本 Halo 升级之后无法修改资料的问题。(旧版本没有用户名校验) #### Which issue(s) this PR fixes: Fixes #4269 #### Does this PR introduce a user-facing change? ```release-note 移除 Console 端用户编辑表单中用户名的校验规则,防止旧版本 Halo 升级之后无法修改资料。 ```pull/4284/head
parent
834e37cf13
commit
617d05f3bc
|
@ -159,19 +159,6 @@ const handleUpdateUser = async () => {
|
||||||
:label="$t('core.user.editing_modal.fields.username.label')"
|
:label="$t('core.user.editing_modal.fields.username.label')"
|
||||||
type="text"
|
type="text"
|
||||||
name="name"
|
name="name"
|
||||||
:validation="[
|
|
||||||
['required'],
|
|
||||||
['length:0,63'],
|
|
||||||
[
|
|
||||||
'matches',
|
|
||||||
/^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$/,
|
|
||||||
],
|
|
||||||
]"
|
|
||||||
:validation-messages="{
|
|
||||||
matches: $t(
|
|
||||||
'core.user.editing_modal.fields.username.validation'
|
|
||||||
),
|
|
||||||
}"
|
|
||||||
></FormKit>
|
></FormKit>
|
||||||
<FormKit
|
<FormKit
|
||||||
id="displayNameInput"
|
id="displayNameInput"
|
||||||
|
|
Loading…
Reference in New Issue