style: fix no-useless-escape — remove unnecessary backslashes in regex char classes

This commit is contained in:
2026-06-25 14:32:53 +01:00
parent 0dff41a4ee
commit 7abacbc2b4
2 changed files with 2 additions and 2 deletions
@@ -49,7 +49,7 @@
} }
function normalizePhone(value: string): string { function normalizePhone(value: string): string {
let cleaned = value.replace(/[\s\-\(\)]/g, ''); let cleaned = value.replace(/[\s\-()]/g, '');
if (cleaned.startsWith('07')) { if (cleaned.startsWith('07')) {
cleaned = '+44' + cleaned.substring(1); cleaned = '+44' + cleaned.substring(1);
} }
+1 -1
View File
@@ -800,7 +800,7 @@
let savingName = $state(false); let savingName = $state(false);
// Name validation (unicode letters, spaces, hyphen, apostrophe, dot) // 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() { function startEditFirstName() {
firstNameInput = userData?.firstName || ''; firstNameInput = userData?.firstName || '';