Макс. констр. скорость (при ПСМ)" tbxMaxSpeed должна быть больше 0

This commit is contained in:
vchikalkin 2024-03-26 12:17:48 +03:00
parent 530cdbf018
commit 61c6f41635

View File

@ -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'],
});
}
}
}
);