7/30 限制前端输入字数

This commit is contained in:
Zy
2026-07-30 17:59:32 +08:00
parent 903c92fef0
commit 2907f9202c
115 changed files with 2561 additions and 1213 deletions

View File

@@ -51,7 +51,11 @@ const reg = {
/** QQ */
qq: /^[1-9]\d{4,11}$/,
/** 微信 */
wechat: /^[a-zA-Z][a-zA-Z0-9_-]{5,19}$/
wechat: /^[a-zA-Z][a-zA-Z0-9_-]{5,19}$/,
/** 护照 */
passport: /^[EG]\d{8}$/,
/** 港澳通行证 */
hongkongPassport: /^[CHMW]\d{8}$/
};
// 自动推导 TS 类型(最标准)
export type RegType = keyof typeof reg;