From d09b6cce047a0fb38c7317a36e03318a695a93be Mon Sep 17 00:00:00 2001 From: Elia Bieri Date: Tue, 22 Oct 2024 09:29:49 +0200 Subject: [PATCH] Fix postcode validation regex --- client/src/utils/postalcode.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/utils/postalcode.ts b/client/src/utils/postalcode.ts index e4fbc3b2..93177698 100644 --- a/client/src/utils/postalcode.ts +++ b/client/src/utils/postalcode.ts @@ -2,6 +2,6 @@ export function validatePostalCode(input: string) { if (input.length < 4) { return false; } - const regex = /^[0-9]/; + const regex = /^\d+$/; return regex.test(input); }