Fix postcode validation regex

This commit is contained in:
Elia Bieri 2024-10-22 09:29:49 +02:00
parent be1df5ce1a
commit d09b6cce04
1 changed files with 1 additions and 1 deletions

View File

@ -2,6 +2,6 @@ export function validatePostalCode(input: string) {
if (input.length < 4) { if (input.length < 4) {
return false; return false;
} }
const regex = /^[0-9]/; const regex = /^\d+$/;
return regex.test(input); return regex.test(input);
} }