nestjs-starter/src/auth/dto/login.dto.ts
2026-02-14 13:41:28 +03:00

22 lines
426 B
TypeScript

import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
export class LoginDto {
@ApiProperty({
description: 'User email',
example: 'user@example.com',
required: true,
})
@IsEmail()
email: string;
@ApiProperty({
description: 'Password',
example: 'Password123!',
required: true,
})
@IsString()
@IsNotEmpty()
password: string;
}