src/auth/dtos/auth.dto.ts
Data Transfer Object (DTO) for authentication payload
Properties |
Type : string
|
Decorators :
@IsEmail()
|
Defined in src/auth/dtos/auth.dto.ts:14
|
Email field with validation rules:
|
password |
Type : string
|
Decorators :
@IsString()
|
Defined in src/auth/dtos/auth.dto.ts:23
|
Password field with validation rules:
|
import { IsEmail, IsNotEmpty, IsString } from 'class-validator';
/**
* Data Transfer Object (DTO) for authentication payload
*/
export class AuthPayloadDto {
/**
* Email field with validation rules:
* - Must be a valid email address
* - Must not be empty
*/
@IsEmail()
@IsNotEmpty()
email: string;
/**
* Password field with validation rules:
* - Must be a string
* - Must not be empty
*/
@IsString()
@IsNotEmpty()
password: string;
}
export default AuthPayloadDto;