2022-07-03 01:51:25 +00:00
|
|
|
|
import { IsEmail, IsOptional, IsString, MinLength } from 'class-validator';
|
2022-02-20 11:51:55 +00:00
|
|
|
|
|
|
|
|
|
export class UpdateUserDto {
|
|
|
|
|
@IsString({ message: '用户头像类型错误(正确类型为:String)' })
|
|
|
|
|
@IsOptional()
|
|
|
|
|
readonly avatar?: string;
|
|
|
|
|
|
|
|
|
|
@IsString({ message: ' 用户邮箱类型错误(正确类型为:String)' })
|
|
|
|
|
@IsEmail()
|
|
|
|
|
@IsOptional()
|
|
|
|
|
readonly email?: string;
|
2022-07-03 01:51:25 +00:00
|
|
|
|
|
|
|
|
|
@MinLength(5, { message: '邮箱验证码至少5个字符' })
|
|
|
|
|
@IsString({ message: '邮箱验证码错误(正确类型为:String)' })
|
|
|
|
|
@IsOptional({ message: '邮箱验证码不能为空' })
|
|
|
|
|
verifyCode?: string;
|
2022-02-20 11:51:55 +00:00
|
|
|
|
}
|