Files
esg/src/auth/dto/login.dto.ts
2026-06-09 14:07:37 +03:30

16 lines
343 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, MinLength } from 'class-validator';
export class LoginDto {
@ApiProperty({ example: 'admin' })
@IsString()
@IsNotEmpty()
username!: string;
@ApiProperty({ example: 'SecureP@ssw0rd' })
@IsString()
@IsNotEmpty()
@MinLength(8)
password!: string;
}