process/insurance: add fingap.insured validation
This commit is contained in:
parent
4a65a39ba3
commit
4fd5c3602e
@ -91,6 +91,16 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||
}
|
||||
});
|
||||
|
||||
const { fingap } = insurance.values;
|
||||
|
||||
if (fingap.insuranceCompany && !fingap.insured) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: `Укажите плательщика ${fingap.policyType}`,
|
||||
path: ['insurance'],
|
||||
});
|
||||
}
|
||||
|
||||
if (
|
||||
!leasingWithoutKasko &&
|
||||
!insDecentral &&
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user