功能:统一账号输入校验并调整首页轮播图

This commit is contained in:
xiaowang
2026-03-26 10:53:19 +08:00
parent 764bfadb51
commit b1177c4f75
18 changed files with 294 additions and 124 deletions
+6
View File
@@ -0,0 +1,6 @@
export const ACCOUNT_REGEX = /^[A-Za-z0-9]+$/
const ACCOUNT_SANITIZE_REGEX = /[^A-Za-z0-9]/g
export const ACCOUNT_RULE_MESSAGE = '账号只能包含字母和数字'
export const sanitizeAccountInput = (value: string) => (value || '').replace(ACCOUNT_SANITIZE_REGEX, '')