File

libs/dtos/src/auth/request/SignUpWithEmailCredentials.dto.ts

Extends

ValidateableDto

Implements

Partial

Index

Properties

Properties

Optional email
Type : string
Decorators :
@ApiProperty()
@IsEmail()
Optional firstName
Type : string
Decorators :
@ApiProperty()
@IsString()
Optional isPrivacyPolicyAccepted
Type : boolean
Decorators :
@ApiProperty()
@IsNotEmpty()
@IsBoolean()
@Equals(undefined, {message: 'You mut read and accept our Privacy Policy terms'})
Optional lastName
Type : string
Decorators :
@ApiProperty()
@IsString()
Optional password
Type : string
Decorators :
@ApiProperty()
@IsStrongPassword(authConfig.isStrongPasswordOptions)
Public validate
Type : function
Inherited from ValidateableDto
Defined in ValidateableDto:11
import {
  IsBoolean,
  IsEmail,
  IsString,
  IsStrongPassword,
  IsNotEmpty,
  Equals
} from 'class-validator'
import { ValidateableDto } from '../../generics/Validateable.dto'
import { authConfig } from '../../../../../config/auth.config'
import { UserInterface } from '@isomera/interfaces'
import { ApiProperty } from '@nestjs/swagger'

export class SignUpWithEmailCredentialsDto
  extends ValidateableDto
  implements Partial<UserInterface>
{
  @ApiProperty()
  @IsString()
  firstName?: string

  @ApiProperty()
  @IsString()
  lastName?: string

  @ApiProperty()
  @IsEmail()
  email?: string

  @ApiProperty()
  @IsStrongPassword(authConfig.isStrongPasswordOptions)
  password?: string

  @ApiProperty()
  @IsNotEmpty()
  @IsBoolean()
  @Equals(true, {
    message: 'You mut read and accept our Privacy Policy terms'
  })
  isPrivacyPolicyAccepted?: boolean
}

results matching ""

    No results matching ""