检查密码默认值

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
+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 }}
>