Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

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

balibabu6fee2962cb89
diff --git a/web/src/pages/user-setting/setting-password/index.tsx b/web/src/pages/user-setting/setting-password/index.tsx
index f1b299ee60..cf7a4d64f7 100644
--- a/web/src/pages/user-setting/setting-password/index.tsx
+++ b/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) {