feat: penyesuaian error validasi create items
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f7198010d3
commit
07d1cc78e2
|
@ -134,7 +134,15 @@ export class ItemDto extends BaseStatusDto implements ItemEntity {
|
|||
},
|
||||
],
|
||||
})
|
||||
@IsArray()
|
||||
@IsArray({
|
||||
message: (body) => {
|
||||
const value = body.value;
|
||||
if (!value || value?.length === 0) {
|
||||
return 'Product bundling tidak boleh kosong.';
|
||||
}
|
||||
return 'Product bundling tidak sesuai.';
|
||||
},
|
||||
})
|
||||
@ValidateIf((body) => body.item_type.toLowerCase() == ItemType.BUNDLING)
|
||||
bundling_items: ItemEntity[];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue