diff --git a/src/auth/dtos/user-auth.dto.ts b/src/auth/dtos/user-auth.dto.ts index 729b735..1d6e2a5 100644 --- a/src/auth/dtos/user-auth.dto.ts +++ b/src/auth/dtos/user-auth.dto.ts @@ -1,5 +1,6 @@ import { ApiProperty } from '@nestjs/swagger'; import { IsEmail, IsNotEmpty, IsString } from 'class-validator'; +import { IsPasswordStrong } from 'src/validators/password.validator'; export class UserSignUpDto { @ApiProperty({ @@ -16,6 +17,10 @@ export class UserSignUpDto { }) @IsString() @IsNotEmpty() + @IsPasswordStrong({ + message: + 'password must be at least 8 characters long and include at least one uppercase letter, one lowercase letter, one numeric digit, and one special character.', + }) public password: string; @ApiProperty({