From d24c9dde20cba23b96082b4db81b5223c75e4ea9 Mon Sep 17 00:00:00 2001 From: odc.xiaohui <xiaohui@Q1> Date: 星期三, 08 三月 2023 09:06:28 +0800 Subject: [PATCH] 身份证正反面调整 --- src/utils/validate.js | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/utils/validate.js b/src/utils/validate.js index 42e530d..03acd66 100644 --- a/src/utils/validate.js +++ b/src/utils/validate.js @@ -29,4 +29,14 @@ const regExp = /(^[浜触娌笣鍐�璞簯杈介粦婀樼殩椴佹柊鑻忔禉璧i剛妗傜敇鏅嬭挋闄曞悏闂借吹绮ら潚钘忓窛瀹佺惣浣块A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9鎸傚璀︽腐婢砞{1}$)/; return regExp.test(str); } +// 鏍¢獙鏁板瓧 +export function validateNum(str){ + const rep = /^[0-9]+(.[0-9]{1,3})?$/; + return rep.test(str); +} +// 楠岃瘉韬唤璇佸彿 +export function validateCardId(str){ + const rep=/^\d{15}|\d{}18$/ + return rep.test(str); +} -- Gitblit v1.8.0