Skip to content

Commit

Permalink
fix: enlever la validation du format du nir lors du processus d'inges…
Browse files Browse the repository at this point in the history
…tion (#3619)

Co-authored-by: Paul Gaucher <[email protected]>
  • Loading branch information
Pomarom and Pomarom authored Mar 27, 2024
1 parent a36421b commit eb14058
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions server/src/common/validation/dossierApprenantSchemaV3.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { NIR_LOOSE_REGEX } from "shared";
import { z } from "zod";

import { primitivesV1, primitivesV3 } from "@/common/validation/utils/zodPrimitives";
Expand Down Expand Up @@ -128,10 +127,8 @@ export const dossierApprenantSchemaV3Input = () => {
.preprocess(
(v: any) => (v ? String(v).replace(/[\s.-]+/g, "") : v),
z
.string()
.trim()
.any()
// On indique juste "13 chiffres attendus", car ça ne devrait pas être 15 (on répare silencieusement quand même à la ligne suivante)
.regex(NIR_LOOSE_REGEX, "NIR invalide (13 chiffres attendus)")
.describe("NIR de l'apprenant")
.openapi({
example: "1234567890123",
Expand Down

0 comments on commit eb14058

Please sign in to comment.