apps/api/src/auth/dto/login.dto.ts
Login Dto Class
Properties |
| password |
Type : string
|
Decorators :
@ApiProperty({required: true})
|
|
Defined in apps/api/src/auth/dto/login.dto.ts:26
|
|
Password field |
| username |
Type : string
|
Decorators :
@ApiProperty({required: true})
|
|
Defined in apps/api/src/auth/dto/login.dto.ts:16
|
|
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;
}