From 8645380fbfa7cbc91f947dc9dc0b2b0098257557 Mon Sep 17 00:00:00 2001 From: tone <3341154833@qq.com> Date: Wed, 7 May 2025 15:16:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96loginDto=E9=94=99=E8=AF=AF?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tone-page-server/src/auth/dto/login.dto.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tone-page-server/src/auth/dto/login.dto.ts b/tone-page-server/src/auth/dto/login.dto.ts index a7fa206..4ef215e 100644 --- a/tone-page-server/src/auth/dto/login.dto.ts +++ b/tone-page-server/src/auth/dto/login.dto.ts @@ -6,26 +6,26 @@ export class LoginDto { @ValidateIf(o => o.type === 'password') @IsString({ message: '账户必须输入' }) - @Length(1, 254, { message: '账户长度错误' })// 用户名、邮箱、手机号 + @Length(1, 254, { message: '账户异常' })// 用户名、邮箱、手机号 account?: string; @ValidateIf(o => o.type === 'password') @IsString({ message: '密码必须输入' }) - @Length(6, 32, { message: '密码长度错误' })// 6-32位 + @Length(6, 32, { message: '密码异常' })// 6-32位 password?: string; @ValidateIf(o => o.type === 'phone') @IsString({ message: '手机号必须输入' }) - @Length(11, 11, { message: '手机号长度错误' })// 中国大陆,11位数字 + @Length(11, 11, { message: '手机号异常' })// 中国大陆,11位数字 phone?: string; @ValidateIf(o => o.type === 'email') @IsString({ message: '邮箱必须输入' }) - @Length(6, 254, { message: '邮箱长度错误' })// RFC 5321 + @Length(6, 254, { message: '邮箱异常' })// RFC 5321 email?: string; @ValidateIf(o => o.type === 'phone' || o.type === 'email') @IsString({ message: '验证码必须输入' }) - @Length(6, 6, { message: '验证码长度错误' })// 6位数字 + @Length(6, 6, { message: '验证码异常' })// 6位数字 code?: string; } \ No newline at end of file