fix : category att valiue array can be 0 length
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { Expose, Type } from "class-transformer";
|
import { Expose, Type } from "class-transformer";
|
||||||
import { ArrayMinSize, IsArray, IsBoolean, IsEnum, IsInt, IsNotEmpty, IsOptional, IsString, ValidateNested } from "class-validator";
|
import { IsArray, IsBoolean, IsEnum, IsInt, IsNotEmpty, IsOptional, IsString, ValidateNested } from "class-validator";
|
||||||
|
|
||||||
import { ApiProperty } from "../../../common/decorator/swggerDocs";
|
import { ApiProperty } from "../../../common/decorator/swggerDocs";
|
||||||
import { IsValidId } from "../../../common/decorator/validation.decorator";
|
import { IsValidId } from "../../../common/decorator/validation.decorator";
|
||||||
@@ -56,7 +56,6 @@ export class UpdateCategoryAttDTO {
|
|||||||
@Expose()
|
@Expose()
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
@IsArray()
|
@IsArray()
|
||||||
@ArrayMinSize(1)
|
|
||||||
@ValidateNested({ each: true })
|
@ValidateNested({ each: true })
|
||||||
@Type(() => AttributeValue)
|
@Type(() => AttributeValue)
|
||||||
@ApiProperty({
|
@ApiProperty({
|
||||||
|
|||||||
Reference in New Issue
Block a user