diff --git a/shared/helpers/openapi/__snapshots__/generateOpenapi.test.ts.snap b/shared/helpers/openapi/__snapshots__/generateOpenapi.test.ts.snap index d590d82d6..e59d1c7b2 100644 --- a/shared/helpers/openapi/__snapshots__/generateOpenapi.test.ts.snap +++ b/shared/helpers/openapi/__snapshots__/generateOpenapi.test.ts.snap @@ -58,7 +58,7 @@ exports[`generateOpenApiSchema > should generate proper schema 1`] = ` "applicant_file_name": { "description": "Nom du fichier du CV du candidat. Seuls les .docx et .pdf sont autorisés.", "minLength": 1, - "pattern": "((.*?))(\\.)+(docx|pdf)$", + "pattern": "((.*?))(\\.)+([Dd][Oo][Cc][Xx]|[Pp][Dd][Ff])$", "type": "string", }, "applicant_first_name": { diff --git a/shared/models/applications.model.ts b/shared/models/applications.model.ts index 249b9d6c5..6a5aa576c 100644 --- a/shared/models/applications.model.ts +++ b/shared/models/applications.model.ts @@ -39,7 +39,7 @@ export const ZApplication = z applicant_attachment_name: z .string() .min(1) - .regex(/((.*?))(\.)+(docx|pdf)$/i) + .regex(/((.*?))(\.)+([Dd][Oo][Cc][Xx]|[Pp][Dd][Ff])$/i) .describe("Nom du fichier du CV du candidat. Seuls les .docx et .pdf sont autorisés."), applicant_message_to_company: z.string().nullable().describe("Un message du candidat vers le recruteur. Ce champ peut contenir la lettre de motivation du candidat."), job_searched_by_user: z.string().nullish().describe("Métier recherché par le candidat"),