Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Commit

Permalink
Merge pull request #7 from zhaixinlong/master
Browse files Browse the repository at this point in the history
fix: bugs
  • Loading branch information
NoBey authored Jan 17, 2019
2 parents 96dbcfa + 45853b0 commit 62e1f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion idCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function birthDay(idCard) {
// 验证身份证号是否正确
function checkIdCard(idCard) {
idCard = idCard.toString()
if (/(^\d{18}$)/.test(idCard) && idCardEndNum(idCard) == idCard[17].toUpperCase()) return true
if (/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(idCard) && idCardEndNum(idCard) == idCard[17].toUpperCase()) return true
return false
}

Expand Down

0 comments on commit 62e1f35

Please sign in to comment.