Skip to content

Commit

Permalink
feat: repair form title check (en required)
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalinDe committed Aug 30, 2023
1 parent 37a5390 commit a3e29b5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/frontend/src/schema/configurationValidation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ import * as yup from 'yup';

const idSchema = yup.string().min(1).required();
const titleSchema = yup.string().required();
const formTitleSchema = yup.object({
en: yup.string().required(),
fr: yup.string(),
de: yup.string(),
});

const selectsSchema = yup.object({
ID: yup.lazy(() => idSchema),
Expand Down Expand Up @@ -403,7 +408,7 @@ const subjectSchema = yup.object({
});

const configurationSchema = yup.object({
MainTitle: yup.lazy(() => titleSchema),
MainTitle: yup.lazy(() => formTitleSchema),
Scaffold: yup.array().of(subjectSchema).required(),
});

Expand Down

0 comments on commit a3e29b5

Please sign in to comment.