fix: 精准"身份证号"的校验

This commit is contained in:
宁宁 2019-07-05 17:25:10 +08:00
parent 9c37d56935
commit f091e0dc7f

View File

@ -77,7 +77,7 @@ module.exports = [{
},
{
title: '身份证号(15位、18位数字)最后一位是校验位可能为数字或字符X',
rule: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/,
rule: /(^\d{6}\d{2}([0-1][0-2]|\d)([0-2]\d|30|31)\d{3}$)|(^\d{6}(18|19|20)\d{2}([0-1][0-2]|\d)([0-2]\d|30|31)\d{3}(\d|X|x)$)/,
example: '如: 622223199912051311'
},
{