We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f85146f commit d2cac28Copy full SHA for d2cac28
src/benchmarks/dto/create-benchmark.dto.ts
@@ -1,11 +1,9 @@
1
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
2
import {
3
IsNotEmpty,
4
- IsNumber,
+ IsNumberString,
5
IsOptional,
6
IsString,
7
- Max,
8
- Min,
9
} from 'class-validator';
10
11
export class CreateBenchmarkDto {
@@ -31,8 +29,10 @@ export class CreateBenchmarkDto {
31
29
difficulty: string;
32
30
33
@IsNotEmpty()
34
- @IsNumber()
35
- @Min(1)
36
- @Max(100)
+ @IsNumberString()
+ // @Transform(parseInt)
+ // @IsInt()
+ // @Min(1)
+ // @Max(100)
37
maxCyclomaticComplexity: number;
38
}
0 commit comments