fix: 修复html注释|座机|密码匹配问题

This commit is contained in:
kingmui 2020-04-25 22:56:23 +08:00
parent ccb17d5ed0
commit 2534905ff2
2 changed files with 6 additions and 6 deletions

View File

@ -164,7 +164,7 @@ vscode应用商店中搜索"**any-rule**".
### html注释 ### html注释
```javascript ```javascript
/<!--[\s\S]*?-->/ /^<!--[\s\S]*?-->$/
``` ```
### md5格式(32位) ### md5格式(32位)
@ -269,7 +269,7 @@ vscode应用商店中搜索"**any-rule**".
### 座机(tel phone)电话(国内),如: 0341-86091234 ### 座机(tel phone)电话(国内),如: 0341-86091234
```javascript ```javascript
/\d{3}-\d{8}|\d{4}-\d{7}/ /^\d{3}-\d{8}$|^\d{4}-\d{7}$/
``` ```
### 身份证号(1代,15位数字) ### 身份证号(1代,15位数字)
@ -344,7 +344,7 @@ vscode应用商店中搜索"**any-rule**".
### 密码强度校验最少6位包括至少1个大写字母1个小写字母1个数字1个特殊字符 ### 密码强度校验最少6位包括至少1个大写字母1个小写字母1个数字1个特殊字符
```javascript ```javascript
/^.*(?=.{6,})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*? ]).*$/ /^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/
``` ```
### 用户名校验4到16位字母数字下划线减号 ### 用户名校验4到16位字母数字下划线减号

View File

@ -85,7 +85,7 @@ module.exports = [{
}, },
{ {
title: 'html注释', title: 'html注释',
rule: /<!--[\s\S]*?-->/, rule: /^<!--[\s\S]*?-->$/,
examples: ['<!--<div class="_bubble"></div>-->'] examples: ['<!--<div class="_bubble"></div>-->']
}, },
{ {
@ -191,7 +191,7 @@ module.exports = [{
}, },
{ {
title: '座机(tel phone)电话(国内),如: 0341-86091234', title: '座机(tel phone)电话(国内),如: 0341-86091234',
rule: /\d{3}-\d{8}|\d{4}-\d{7}/, rule: /^\d{3}-\d{8}$|^\d{4}-\d{7}$/,
examples: ['0936-4211235'] examples: ['0936-4211235']
}, },
{ {
@ -267,7 +267,7 @@ module.exports = [{
}, },
{ {
title: '密码强度校验最少6位包括至少1个大写字母1个小写字母1个数字1个特殊字符', title: '密码强度校验最少6位包括至少1个大写字母1个小写字母1个数字1个特殊字符',
rule: /^.*(?=.{6,})(?=.*\d)(?=.*[A-Z])(?=.*[a-z])(?=.*[!@#$%^&*? ]).*$/, rule: /^\S*(?=\S{6,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*? ])\S*$/,
examples: ['Kd@curry666'] examples: ['Kd@curry666']
}, },
{ {