fix insurance validation insuranceCompany
This commit is contained in:
parent
d5b5dbba12
commit
99d7af4ac6
@ -66,7 +66,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||
});
|
||||
}
|
||||
|
||||
if (insCost > 0 && !insuranceCompany) {
|
||||
if (!insuranceCompany) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: `Укажите страховую компанию ${policyType}`,
|
||||
@ -74,7 +74,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||
});
|
||||
}
|
||||
|
||||
if (insCost > 0 && !insTerm) {
|
||||
if (!insTerm) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: `Укажите срок страхования ${policyType}`,
|
||||
@ -82,7 +82,7 @@ export function createValidationSchema({ apolloClient }: ValidationContext) {
|
||||
});
|
||||
}
|
||||
|
||||
if (insCost > 0 && !insured) {
|
||||
if (!insured) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
message: `Укажите плательщика ${policyType}`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user