File

src/auth/dto/setpass.dto.ts

Index

Properties

Properties

code
Type : string
Decorators :
@IsString()
@IsNotEmpty()
@IsCodeValid()
@IsCodeExpired()
id
Type : string
Decorators :
@IsString()
@IsNotEmpty()
password
Type : string
Decorators :
@MinLength(8, {message: undefined})
@MaxLength(128, {message: undefined})
@IsNotEmpty({message: undefined})
import { IsNotEmpty, IsString, MaxLength, MinLength } from 'class-validator';
import { RegisterRespEnum } from '../../utils/enums/responses/register.enum';
import { IsCodeValid } from '../../common/decorators/codevaild.decorator';
import { IsCodeExpired } from '../../common/decorators/codeexpired.decorator';

export class SetOauthPassDto {
  @IsString()
  @IsNotEmpty()
  @IsCodeValid()
  @IsCodeExpired()
  code: string;

  @IsString()
  @IsNotEmpty()
  id: string;

  @MinLength(8, {
    message: RegisterRespEnum.ERR_PASSWORD_TOOSHORT,
  })
  @MaxLength(128, {
    message: RegisterRespEnum.ERR_PASSWORD_TOOLONG,
  })
  @IsNotEmpty({
    message: RegisterRespEnum.ERR_PASSWORD_INVALID,
  })
  password: string;
}

results matching ""

    No results matching ""