From 7abacbc2b4b1ed3f24c38849c08a0d0ec19b59ad Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Thu, 25 Jun 2026 14:32:53 +0100 Subject: [PATCH] =?UTF-8?q?style:=20fix=20no-useless-escape=20=E2=80=94=20?= =?UTF-8?q?remove=20unnecessary=20backslashes=20in=20regex=20char=20classe?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/lib/components/ui/phone-input/PhoneInput.svelte | 2 +- frontend/src/routes/account/+page.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/ui/phone-input/PhoneInput.svelte b/frontend/src/lib/components/ui/phone-input/PhoneInput.svelte index 2229e34..5c85a01 100644 --- a/frontend/src/lib/components/ui/phone-input/PhoneInput.svelte +++ b/frontend/src/lib/components/ui/phone-input/PhoneInput.svelte @@ -49,7 +49,7 @@ } function normalizePhone(value: string): string { - let cleaned = value.replace(/[\s\-\(\)]/g, ''); + let cleaned = value.replace(/[\s\-()]/g, ''); if (cleaned.startsWith('07')) { cleaned = '+44' + cleaned.substring(1); } diff --git a/frontend/src/routes/account/+page.svelte b/frontend/src/routes/account/+page.svelte index c45ce1a..049d21a 100644 --- a/frontend/src/routes/account/+page.svelte +++ b/frontend/src/routes/account/+page.svelte @@ -800,7 +800,7 @@ let savingName = $state(false); // Name validation (unicode letters, spaces, hyphen, apostrophe, dot) - const nameRegex = /^[\p{L}\p{M}\s\-'\.]+$/u; + const nameRegex = /^[\p{L}\p{M}\s-'.]+$/u; function startEditFirstName() { firstNameInput = userData?.firstName || '';