mirror of
https://github.com/any86/any-rule.git
synced 2025-07-14 15:38:58 +08:00
fix: 修复html注释|座机|密码匹配问题
This commit is contained in:
parent
ccb17d5ed0
commit
2534905ff2
@ -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位(字母,数字,下划线,减号)
|
||||||
|
@ -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']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user