From a5331adfcaed6f878ec9e777f749c8843f0fc045 Mon Sep 17 00:00:00 2001 From: Sebastian Pravda Date: Tue, 6 Dec 2022 17:56:23 +0100 Subject: [PATCH] feat: birthdate regex --- .../routes/(candidate)/(authenticated)/register/+page.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte b/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte index 1868ed9..b9216f7 100644 --- a/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte +++ b/frontend/src/routes/(candidate)/(authenticated)/register/+page.svelte @@ -58,7 +58,10 @@ .required() .matches(/^\+\d{1,3} \d{3} \d{3} \d{3}$/), birthplace: yup.string().required(), - birthdate: yup.string().required(), + birthdate: yup + .string() + .required() + .matches(/^([0-3]?[0-9])\.([1-9]|1[0-2])\.[0-9]{4}$/), sex: yup.string(), address: yup.string().required(), citizenship: yup.string().required(),