From b26825ae3a1d3e34c4828576aa921aed25427d94 Mon Sep 17 00:00:00 2001 From: Adrian Kunz Date: Sat, 17 Feb 2024 16:19:47 +0100 Subject: [PATCH] fix: Use IsTimeZone --- libs/types/src/lib/schema/poll.schema.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/types/src/lib/schema/poll.schema.ts b/libs/types/src/lib/schema/poll.schema.ts index 393f5975..8f44cb2b 100644 --- a/libs/types/src/lib/schema/poll.schema.ts +++ b/libs/types/src/lib/schema/poll.schema.ts @@ -3,7 +3,7 @@ import {objectIdToBase64, RefArray} from '@mean-stream/nestx/ref'; import {Prop, Schema, SchemaFactory} from '@nestjs/mongoose'; import {ApiProperty, ApiPropertyOptional} from '@nestjs/swagger'; import {Type} from 'class-transformer'; -import {IsNotEmpty, IsObject, IsOptional, IsString, MinLength, ValidateNested} from 'class-validator'; +import {IsNotEmpty, IsObject, IsOptional, IsString, IsTimeZone, MinLength, ValidateNested} from 'class-validator'; import {Types} from 'mongoose'; import {Settings, SettingsSchema} from './settings'; @@ -50,7 +50,7 @@ export class Poll { @Prop() @ApiProperty() @IsOptional() - @IsString() // TODO IsTimeZone will be added to class-validator soon + @IsTimeZone() timeZone?: string; @Prop({required: true, index: 1})