Skip to content

Commit da42fed

Browse files
修改密码处添加验证规则
1 parent 72bd471 commit da42fed

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

client/web/src/components/modals/ModifyPassword.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ const schema = createMetaFormSchema({
4545
newPassword: metaFormFieldSchema
4646
.string()
4747
.min(6, t('密码不能低于6位'))
48+
.matches(/[A-Z]/, '密码必须包含大写字母')
49+
.matches(/[a-z]/, '密码必须包含小写字母')
50+
.matches(/\d/, '密码必须包含数字')
51+
.matches(/[`~!@#$%^&*()_+./,;':"*]/, '密码必须包含符号')
4852
.required(t('密码不能为空')),
4953
newPasswordRepeat: metaFormFieldSchema
5054
.string()

0 commit comments

Comments
 (0)