Skip to content

Commit

Permalink
修改密码处添加验证规则
Browse files Browse the repository at this point in the history
  • Loading branch information
time-container committed Aug 27, 2024
1 parent 72bd471 commit da42fed
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions client/web/src/components/modals/ModifyPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ const schema = createMetaFormSchema({
newPassword: metaFormFieldSchema
.string()
.min(6, t('密码不能低于6位'))
.matches(/[A-Z]/, '密码必须包含大写字母')
.matches(/[a-z]/, '密码必须包含小写字母')
.matches(/\d/, '密码必须包含数字')
.matches(/[`~!@#$%^&*()_+./,;':"*]/, '密码必须包含符号')
.required(t('密码不能为空')),
newPasswordRepeat: metaFormFieldSchema
.string()
Expand Down

0 comments on commit da42fed

Please sign in to comment.