Skip to content

Commit

Permalink
fix: Use IsTimeZone
Browse files Browse the repository at this point in the history
  • Loading branch information
Clashsoft committed Feb 17, 2024
1 parent 43fd16f commit b26825a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libs/types/src/lib/schema/poll.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit b26825a

Please sign in to comment.