From 81ba0bc869ed0fd9974d5e47e194d5a3fc5d8224 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期四, 16 六月 2022 16:57:42 +0800 Subject: [PATCH] check car no --- 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