feat:蓝牙绑定和在线客服
This commit is contained in:
@@ -9,3 +9,14 @@ export function isValidSmsCode(code: string): boolean {
|
||||
export function isValidPassword(password: string): boolean {
|
||||
return password.length >= 6 && password.length <= 32
|
||||
}
|
||||
|
||||
/** 设置/修改登录密码:8-20 位,且字母、数字、符号至少包含 2 种 */
|
||||
export function isValidStrongPassword(password: string): boolean {
|
||||
const value = password.trim()
|
||||
if (value.length < 8 || value.length > 20) return false
|
||||
let types = 0
|
||||
if (/[a-zA-Z]/.test(value)) types += 1
|
||||
if (/\d/.test(value)) types += 1
|
||||
if (/[^a-zA-Z0-9]/.test(value)) types += 1
|
||||
return types >= 2
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user