检查密码默认值

This commit is contained in:
whyour
2021-10-19 21:46:24 +08:00
parent c42299766c
commit 6315425a7b
3 changed files with 18 additions and 3 deletions
+8 -2
View File
@@ -153,7 +153,13 @@ const Initialization = () => {
<Form.Item
label="密码"
name="password"
rules={[{ required: true }]}
rules={[
{ required: true },
{
pattern: /^(?!admin$).*$/,
message: '密码不能为admin',
},
]}
hasFeedback
style={{ maxWidth: 350 }}
>
@@ -190,7 +196,7 @@ const Initialization = () => {
{
title: '完成安装',
content: (
<div className={styles.top} style={{ marginTop: 100 }}>
<div className={styles.top} style={{ marginTop: 80 }}>
<div className={styles.header}>
<span className={styles.title}></span>
<Link href="https://github.com/whyour/qinglong" target="_blank">
+7 -1
View File
@@ -175,7 +175,13 @@ const SecuritySettings = ({ user, userChange }: any) => {
<Form.Item
label="密码"
name="password"
rules={[{ required: true }]}
rules={[
{ required: true },
{
pattern: /^(?!admin$).*$/,
message: '密码不能为admin',
},
]}
hasFeedback
style={{ maxWidth: 300 }}
>