Skip to content

Commit

Permalink
fix: phone regex (#838)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevbarns authored Nov 21, 2023
1 parent d175f6a commit 2218276
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shared/routes/v1Jobs.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,10 @@ export const zV1JobsRoutes = {
establishment_siret: extensions.siret,
first_name: z.string(),
last_name: z.string(),
phone: extensions.phone().optional(),
phone: z
.string()
.trim()
.regex(/^0[1-9]\d{8}$/),
email: z.string().email(),
idcc: z.string().optional(),
origin: z.string().optional().openapi({
Expand Down

0 comments on commit 2218276

Please sign in to comment.