浏览代码

fix: Limit the length of the new password input box to no less than 8 #1634 (#1696)

### What problem does this PR solve?

fix: Limit the length of the new password input box to no less than 8
#1634

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.9.0
balibabu 1年前
父节点
当前提交
6fee2962cb
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入4 次删除
  1. 2
    4
      web/src/pages/user-setting/setting-password/index.tsx

+ 2
- 4
web/src/pages/user-setting/setting-password/index.tsx 查看文件

@@ -6,7 +6,6 @@ import SettingTitle from '../components/setting-title';
import { useValidateSubmittable } from '../hooks';

import { useTranslate } from '@/hooks/common-hooks';
import parentStyles from '../index.less';
import styles from './index.less';

type FieldType = {
@@ -81,13 +80,11 @@ const UserSettingPassword = () => {
message: t('newPasswordMessage'),
whitespace: true,
},
{ type: 'string', min: 8, message: t('newPasswordDescription') },
]}
>
<Input.Password />
</Form.Item>
<p className={parentStyles.itemDescription}>
{t('newPasswordDescription')}
</p>
</Form.Item>
<Divider />
<Form.Item<FieldType>
@@ -100,6 +97,7 @@ const UserSettingPassword = () => {
message: t('confirmPasswordMessage'),
whitespace: true,
},
{ type: 'string', min: 8, message: t('newPasswordDescription') },
({ getFieldValue }) => ({
validator(_, value) {
if (!value || getFieldValue('new_password') === value) {

正在加载...
取消
保存