Skip to content

Commit

Permalink
remove forced sv from validations
Browse files Browse the repository at this point in the history
  • Loading branch information
mluukkai committed Sep 4, 2024
1 parent 1662e21 commit a18c8bc
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/validators/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { z } from 'zod'

const Locales = z.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
})

Expand Down
8 changes: 4 additions & 4 deletions src/validators/questions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const NewQuestionZod = z.object({
parentId: z.number().nullish().default(null),
title: z.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
}),
text: z.object({
Expand All @@ -18,13 +18,13 @@ export const NewQuestionZod = z.object({
z.object({
title: z.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
}),
data: z
.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
})
.optional(),
Expand All @@ -43,7 +43,7 @@ export type NewQuestion = z.infer<typeof NewQuestionZod>
export const UpdatedQuestionZod = z.object({
title: z.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
}),
text: z.object({
Expand Down
6 changes: 3 additions & 3 deletions src/validators/results.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const NewResultFormZod = z.object({
optionLabel: z.string().nonempty(),
isSelected: z.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
}),
})
Expand All @@ -16,7 +16,7 @@ export const NewResultZod = z.object({
optionLabel: z.string().nonempty(),
isSelected: z.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
}),
data: z.record(
Expand All @@ -34,7 +34,7 @@ export type NewResult = z.infer<typeof NewResultZod>
export const UpdatedResultZod = z.object({
isSelected: z.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
}),
data: z.record(
Expand Down
2 changes: 1 addition & 1 deletion src/validators/survey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { z } from 'zod'
export const UpdatedSurveyInfoZod = z.object({
title: z.object({
fi: z.string().nonempty(),
sv: z.string().nonempty(),
sv: z.string(),
en: z.string().nonempty(),
}),
text: z.object({
Expand Down

0 comments on commit a18c8bc

Please sign in to comment.