From 5619ebfc1795808bbae0f58bf87017442e68de02 Mon Sep 17 00:00:00 2001 From: Avnyr Date: Tue, 27 Feb 2024 16:44:20 +0100 Subject: [PATCH] AuthDTO update --- src/auth/dto/auth.dto.ts | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) 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