Files
teamwallet/myteamwallet_backend/src/auth/dto/auth-update.dto.ts
2026-08-02 09:22:16 +02:00

32 lines
751 B
TypeScript

import { ApiProperty } from '@nestjs/swagger';
import { IsBoolean, IsNotEmpty, IsOptional, MinLength } from 'class-validator';
import { IsExist } from '../../utils/validators/is-exists.validator';
export class AuthUpdateDto {
@ApiProperty({ default: true })
@IsOptional()
@IsBoolean()
helpTextsEnabled?: boolean;
@ApiProperty({ example: 'John' })
@IsOptional()
@IsNotEmpty({ message: 'mustBeNotEmpty' })
firstName?: string;
@ApiProperty({ example: 'Doe' })
@IsOptional()
@IsNotEmpty({ message: 'mustBeNotEmpty' })
lastName?: string;
@ApiProperty()
@IsOptional()
@IsNotEmpty()
@MinLength(6)
password?: string;
@ApiProperty()
@IsOptional()
@IsNotEmpty({ message: 'mustBeNotEmpty' })
oldPassword: string;
}