From ea05b9be825899d4c86d131fb9a38ad58f078fa5 Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期五, 28 一月 2022 18:49:17 +0800
Subject: [PATCH] 授权正式版

---
 src/scripts/validate.ts |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/scripts/validate.ts b/src/scripts/validate.ts
index bd50caa..9a0dca2 100644
--- a/src/scripts/validate.ts
+++ b/src/scripts/validate.ts
@@ -58,6 +58,9 @@
 }
 
 export function isIDCard(rule, idcode, callback) {
+  if (idcode==""||idcode===undefined) {
+    return callback()
+  }
   var weight_factor = [7,9,10,5,8,4,2,1,6,3,7,9,10,5,8,4,2];
   var check_code = ['1', '0', 'X' , '9', '8', '7', '6', '5', '4', '3', '2'];
 

--
Gitblit v1.8.0