From 1e07cfd8ac6c3e31e94c0ea98dcff61db51e49d1 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期一, 09 一月 2023 16:54:39 +0800 Subject: [PATCH] fix: 单选框展示 --- 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