File

apps/api/src/auth/dto/login.dto.ts

Description

Login Dto Class

Index

Properties

Properties

password
Type : string
Decorators :
@ApiProperty({required: true})
@IsNotEmpty()
@MinLength(8)

Password field

username
Type : string
Decorators :
@ApiProperty({required: true})
@IsAlphanumeric()
@IsNotEmpty()

Username field

import { ApiProperty } from '@nestjs/swagger';
import { IsAlphanumeric, IsNotEmpty, MinLength } from 'class-validator';

/**
 * Login Dto Class
 */
export class LoginDto {
  /**
   * Username field
   */
  @ApiProperty({
    required: true,
  })
  @IsAlphanumeric()
  @IsNotEmpty()
  username: string;

  /**
   * Password field
   */
  @ApiProperty({
    required: true,
  })
  @IsNotEmpty()
  @MinLength(8)
  password: string;
}

results matching ""

    No results matching ""