Files
lcbp3/backend/src/common/auth/dto/register.dto.ts
2025-11-19 16:58:44 +07:00

31 lines
456 B
TypeScript

import {
IsEmail,
IsNotEmpty,
IsString,
MinLength,
IsOptional,
} from 'class-validator';
export class RegisterDto {
@IsString()
@IsNotEmpty()
username!: string;
@IsString()
@IsNotEmpty()
@MinLength(6, { message: 'Password must be at least 6 characters' })
password!: string;
@IsEmail()
@IsNotEmpty()
email!: string;
@IsString()
@IsOptional()
firstName?: string;
@IsString()
@IsOptional()
lastName?: string;
}