Update RULES.js

添加港澳台证件号正则
This commit is contained in:
Bin 2020-07-30 17:02:15 +08:00 committed by GitHub
parent a66c7b636b
commit c4067ddfc2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -330,5 +330,20 @@ module.exports = [{
title:'数字和英文字母组成,并且同时含有数字和英文字母',
rule:/^(?=.*[a-zA-Z])(?=.*\d).+$/,
examples: ['我a我1我', 'a对1']
}
];
},
{
title: '香港身份证 ',
rule: /^[a-zA-Z]\d{6}\([\dA]\)$/,
examples: ['K034169(1)']
},
{
title:'澳门身份证 ',
rule: /^[1|5|7]\d{6}[(\d)]{3}$/,
examples: ['5686611(1)']
},
{
title: '台湾身份证 ',
rule: /^[a-zA-Z][0-9]{9}$/,
examples: ['U193683453']
},
];