22 lines
416 B
TypeScript
22 lines
416 B
TypeScript
import { IsEmail, IsString, MinLength } from 'class-validator';
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
export class LoginDto {
|
|
@ApiProperty({
|
|
description: 'User email address',
|
|
example: 'user@example.com',
|
|
})
|
|
@IsEmail()
|
|
email: string;
|
|
|
|
@ApiProperty({
|
|
description: 'User password',
|
|
example: 'password123',
|
|
minLength: 6,
|
|
})
|
|
@IsString()
|
|
@MinLength(6)
|
|
password: string;
|
|
}
|
|
|