feat:登录注册完成
This commit is contained in:
11
src/utils/validate.ts
Normal file
11
src/utils/validate.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export function isValidPhone(phone: string): boolean {
|
||||
return /^1\d{10}$/.test(phone.trim())
|
||||
}
|
||||
|
||||
export function isValidSmsCode(code: string): boolean {
|
||||
return /^\d{4,6}$/.test(code.trim())
|
||||
}
|
||||
|
||||
export function isValidPassword(password: string): boolean {
|
||||
return password.length >= 6 && password.length <= 32
|
||||
}
|
||||
Reference in New Issue
Block a user