import { ApiProperty } from '@nestjs/swagger'; import { IsString, Matches, MinLength } from 'class-validator'; export class MfaConfirmDto { @ApiProperty() @IsString() @MinLength(1) setupToken!: string; @ApiProperty() @IsString() @Matches(/^\d{6}$/, { message: 'code must be a 6-digit number' }) code!: string; }