src/auth/dtos/auth-login-user.dto.ts
Properties |
Type : string
|
Decorators :
@ApiProperty({type: 'string', required: true})
|
|
Defined in src/auth/dtos/auth-login-user.dto.ts:10
|
| mfaCode |
Type : string
|
Decorators :
@ApiProperty({type: 'string', required: true})
|
|
Defined in src/auth/dtos/auth-login-user.dto.ts:29
|
| password |
Type : string
|
Decorators :
@ApiProperty({type: 'string', required: true})
|
|
Defined in src/auth/dtos/auth-login-user.dto.ts:21
|
| session |
Type : string
|
Decorators :
@ApiProperty({type: 'string', required: true})
|
|
Defined in src/auth/dtos/auth-login-user.dto.ts:37
|
import { ApiProperty } from "@nestjs/swagger";
import { IsEmail, IsOptional, IsString, Matches } from "class-validator";
export class AuthLoginUserDto {
@ApiProperty({
type: "string",
required: true,
})
@IsEmail()
email: string;
/* Minimum eight characters, at least one uppercase letter, one lowercase letter, one number, and one special character */
@ApiProperty({
type: "string",
required: true,
})
@Matches(
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$&+,:;=?@#|'<>.^*()%!-])[^\s]{8,}$/,
{ message: "invalid password" },
)
password: string;
@ApiProperty({
type: "string",
required: true,
})
@IsString()
@IsOptional()
mfaCode: string;
@ApiProperty({
type: "string",
required: true,
})
@IsString()
@IsOptional()
session: string;
}