From ee5e518cc80fcb9d634fa3c12b5963dcbeedf9f7 Mon Sep 17 00:00:00 2001 From: haoxuan <haoxuan> Date: 星期五, 01 九月 2023 19:29:31 +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