소스 검색

密码正则表达式修改

chenminghua 1 년 전
부모
커밋
3a0fc23245
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      exam-06173-vue/src/utils/validate.js

+ 1 - 1
exam-06173-vue/src/utils/validate.js

@@ -104,6 +104,6 @@ export function checkPass(str) {
   if (str == null || str.length < 6) {
     return false
   }
-  const regx = new RegExp("^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[~@#$%^&+=])(?=\\S+$).{8,}$")
+const regx = new RegExp("^(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[~@#$%^&+=*/|!])(?=\\S+$).{8,}$")
   return regx.test(str)
 }