Explorar el Código

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 hace 1 año
padre
commit
6fee2962cb
No account linked to committer's email address
Se han modificado 1 ficheros con 2 adiciones y 4 borrados
  1. 2
    4
      web/src/pages/user-setting/setting-password/index.tsx

+ 2
- 4
web/src/pages/user-setting/setting-password/index.tsx Ver fichero

import { useValidateSubmittable } from '../hooks'; import { useValidateSubmittable } from '../hooks';


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


type FieldType = { type FieldType = {
message: t('newPasswordMessage'), message: t('newPasswordMessage'),
whitespace: true, whitespace: true,
}, },
{ type: 'string', min: 8, message: t('newPasswordDescription') },
]} ]}
> >
<Input.Password /> <Input.Password />
</Form.Item> </Form.Item>
<p className={parentStyles.itemDescription}>
{t('newPasswordDescription')}
</p>
</Form.Item> </Form.Item>
<Divider /> <Divider />
<Form.Item<FieldType> <Form.Item<FieldType>
message: t('confirmPasswordMessage'), message: t('confirmPasswordMessage'),
whitespace: true, whitespace: true,
}, },
{ type: 'string', min: 8, message: t('newPasswordDescription') },
({ getFieldValue }) => ({ ({ getFieldValue }) => ({
validator(_, value) { validator(_, value) {
if (!value || getFieldValue('new_password') === value) { if (!value || getFieldValue('new_password') === value) {

Cargando…
Cancelar
Guardar