File

src/auth/dto/auth-credential.dto.ts

Index

Properties

Properties

password
Type : string
Decorators :
@IsString()
@MinLength(4)
@MaxLength(20)
@Matches(/((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/, {message: 'Password must contain uppercase, lowercase and symbol'})
username
Type : string
Decorators :
@IsString()
@MinLength(4)
@MaxLength(20)
import { Matches, IsString, MinLength, MaxLength } from 'class-validator';

export class AuthCredentialDto {

  @IsString()
  @MinLength(4)
  @MaxLength(20)
  username: string;

  @IsString()
  @MinLength(4)
  @MaxLength(20)
  @Matches(
    /((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
  {message: 'Password must contain uppercase, lowercase and symbol'},
  )
  password: string;
}

result-matching ""

    No results matching ""