File

src/auth/dtos/auth-confirm-password-user.dto.ts

Index

Properties

Properties

confirmationCode
Type : string
Decorators :
@ApiProperty({type: 'string', required: true})
@IsString()
email
Type : string
Decorators :
@ApiProperty({type: 'string', required: true})
@IsEmail()
newPassword
Type : string
Decorators :
@ApiProperty({type: 'string', required: true})
@Matches(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$&+,:;=?@#|'<>.^*()%!-])[^\s]{8,}$/, {message: 'invalid password'})
import { ApiProperty } from "@nestjs/swagger";
import { IsEmail, IsString, Matches } from "class-validator";

export class AuthConfirmPasswordUserDto {
  @ApiProperty({
    type: "string",
    required: true,
  })
  @IsEmail()
  email: string;

  @ApiProperty({
    type: "string",
    required: true,
  })
  @IsString()
  confirmationCode: string;

  @ApiProperty({
    type: "string",
    required: true,
  })
  @Matches(
    /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$&+,:;=?@#|'<>.^*()%!-])[^\s]{8,}$/,
    { message: "invalid password" },
  )
  newPassword: string;
}

results matching ""

    No results matching ""