From 61c6f41635f4645e4f570c28d0a6e5c6c3a60671 Mon Sep 17 00:00:00 2001 From: vchikalkin Date: Tue, 26 Mar 2024 12:17:48 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81.=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=81=D1=82=D1=80.=20=D1=81=D0=BA=D0=BE=D1=80=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D1=8C=20(=D0=BF=D1=80=D0=B8=20=D0=9F=D0=A1=D0=9C)"=20tbx?= =?UTF-8?q?MaxSpeed=20=D0=B4=D0=BE=D0=BB=D0=B6=D0=BD=D0=B0=20=D0=B1=D1=8B?= =?UTF-8?q?=D1=82=D1=8C=20=D0=B1=D0=BE=D0=BB=D1=8C=D1=88=D0=B5=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/web/process/leasing-object/validation.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/web/process/leasing-object/validation.ts b/apps/web/process/leasing-object/validation.ts index beec27d..abd36da 100644 --- a/apps/web/process/leasing-object/validation.ts +++ b/apps/web/process/leasing-object/validation.ts @@ -161,6 +161,17 @@ export function createValidationSchema({ apolloClient }: ValidationContext) { path: ['selectLeaseObjectCategory'], }); } + + if ( + evo_leasingobject_type?.evo_id && + ['6', '9', '10'].includes(evo_leasingobject_type?.evo_id) + ) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: 'Значение поля должно быть больше 0', + path: ['tbxMaxSpeed'], + }); + } } } );