process/insurance: add fingap validation
This commit is contained in:
parent
f9eda3c6b0
commit
11820a7b5d
@ -129,6 +129,14 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||
});
|
||||
}
|
||||
|
||||
if (!fingap.insuranceCompany && fingap.insCost > 0) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: `Укажите страховую компанию ${fingap.policyType}`,
|
||||
path: ['insurance'],
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
!leasingWithoutKasko &&
|
||||
!insDecentral &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user