diff --git a/src/auth/dto/auth.dto.ts b/src/auth/dto/auth.dto.ts index 1d4cdb1..04898ec 100644 --- a/src/auth/dto/auth.dto.ts +++ b/src/auth/dto/auth.dto.ts @@ -1,4 +1,16 @@ -export interface AuthDto { - email: string, - password: string +import { IsEmail, IsNotEmpty, IsStrongPassword } from "class-validator"; + +export class AuthDto { + @IsEmail() + @IsNotEmpty() + email: string; + + @IsStrongPassword({ + minLength: 8, + minLowercase: 1, + minUppercase: 1, + minNumbers: 1, + minSymbols: 1, + }) + password: string; } \ No newline at end of file