fix(SPG-524) BE - Create item wahana - Error constraint value limit

pull/2/head
ashar 2024-06-19 12:42:13 +07:00
parent 554cda2144
commit 5880a6051f
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ export class ItemDto extends BaseStatusDto implements ItemEntity {
example: 60,
})
@IsNumber()
@ValidateIf((body) => body.item_type.toLowerCase() == ItemType.WAHANA)
@ValidateIf((body) => body.item_type.toLowerCase() == ItemType.WAHANA && body.limit_type.toLowerCase() != LimitType.NO_LIMIT)
limit_value: number;
@ApiProperty({ type: Boolean, required: false })