修改检查邀请码的正则

This commit is contained in:
CounterFire2023 2024-04-22 13:24:45 +08:00
parent 641a11eabe
commit b27f765d73

View File

@ -7,7 +7,7 @@ export const isObjectIdString = (str: string) => {
// check if a string is a valid share code // check if a string is a valid share code
// alphabet:'3fBCM8j17XNA9xYun4wmLWep2oHFlhPcgyEJskqOz6GK0UtV5ZRaDSvrTbidQI' // alphabet:'3fBCM8j17XNA9xYun4wmLWep2oHFlhPcgyEJskqOz6GK0UtV5ZRaDSvrTbidQI'
export const isValidShareCode = (str: string) => { export const isValidShareCode = (str: string) => {
let reg = new RegExp(`^[${BASE52_ALPHABET}]{10, 11}$`) let reg = new RegExp(`^[${BASE52_ALPHABET}]{10,11}$`)
return reg.test(str) return reg.test(str)
} }