From 0a0b0b069da443f88dcea6c244851ef967c897b2 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Fri, 5 Dec 2025 19:09:31 +0300 Subject: [PATCH 1/7] allowed hypens for legal names --- src/CONST/index.ts | 1 + src/languages/en.ts | 1 + src/libs/ValidationUtils.ts | 6 +++--- .../settings/Profile/PersonalDetails/LegalNamePage.tsx | 8 ++++---- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/CONST/index.ts b/src/CONST/index.ts index fa1f11d6fe69b..319e0a7cb1adb 100755 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -3714,6 +3714,7 @@ const CONST = { SPECIAL_CHARS_WITHOUT_NEWLINE: /((?!\n)[()-\s\t])/g, DIGITS_AND_PLUS: /^\+?[0-9]*$/, ALPHABETIC_AND_LATIN_CHARS: /^[\p{Script=Latin} ]*$/u, + ALPHABETIC_AND_LATIN_CHARS_WITH_HYPHEN: /^[\p{Script=Latin} -]*$/u, NON_ALPHABETIC_AND_NON_LATIN_CHARS: /[^\p{Script=Latin}]/gu, POSITIVE_INTEGER: /^\d+$/, PO_BOX: /\b[P|p]?(OST|ost)?\.?\s*[O|o|0]?(ffice|FFICE)?\.?\s*[B|b][O|o|0]?[X|x]?\.?\s+[#]?(\d+)\b/, diff --git a/src/languages/en.ts b/src/languages/en.ts index 43336aa38b915..7e2ea85006bbd 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2863,6 +2863,7 @@ const translations = { dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Date should be before ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Date should be after ${dateString}`, hasInvalidCharacter: 'Name can only include Latin characters', + hasInvalidCharacterWithHyphen: 'Name can only include Latin characters and hyphen', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Incorrect zip code format${zipFormat ? ` Acceptable format: ${zipFormat}` : ''}`, invalidPhoneNumber: `Please ensure the phone number is valid (e.g. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts index 4d684c45aceba..b5ed22f736ed7 100644 --- a/src/libs/ValidationUtils.ts +++ b/src/libs/ValidationUtils.ts @@ -381,10 +381,10 @@ function isValidDisplayName(name: string): boolean { } /** - * Checks that the provided legal name doesn't contain special characters + * Checks that the provided legal name doesn't contain special characters except hyphens when shouldAllowHyphen is passed as true. */ -function isValidLegalName(name: string): boolean { - return CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS.test(name); +function isValidLegalName(name: string, shouldAllowHyphen = false): boolean { + return shouldAllowHyphen ? CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS_WITH_HYPHEN.test(name) : CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS.test(name); } /** diff --git a/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx b/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx index c5fd72955d8e6..b5745efee0781 100644 --- a/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx @@ -49,8 +49,8 @@ function LegalNamePage() { if (typeof values.legalFirstName === 'string') { if (!values.legalFirstName) { errors.legalFirstName = translate('common.error.fieldRequired'); - } else if (!isValidLegalName(values.legalFirstName)) { - addErrorMessage(errors, 'legalFirstName', translate('privatePersonalDetails.error.hasInvalidCharacter')); + } else if (!isValidLegalName(values.legalFirstName, true)) { + addErrorMessage(errors, 'legalFirstName', translate('privatePersonalDetails.error.hasInvalidCharacterWithHyphen')); } else if (values.legalFirstName.length > CONST.LEGAL_NAME.MAX_LENGTH) { addErrorMessage( errors, @@ -66,8 +66,8 @@ function LegalNamePage() { if (typeof values.legalLastName === 'string') { if (!values.legalLastName) { errors.legalLastName = translate('common.error.fieldRequired'); - } else if (!isValidLegalName(values.legalLastName)) { - addErrorMessage(errors, 'legalLastName', translate('privatePersonalDetails.error.hasInvalidCharacter')); + } else if (!isValidLegalName(values.legalLastName, true)) { + addErrorMessage(errors, 'legalLastName', translate('privatePersonalDetails.error.hasInvalidCharacterWithHyphen')); } else if (values.legalLastName.length > CONST.LEGAL_NAME.MAX_LENGTH) { addErrorMessage( errors, From 7289ebd7183578c3086403f4cf5d1e7333abd0c1 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Tue, 9 Dec 2025 23:30:18 +0300 Subject: [PATCH 2/7] added copy --- src/languages/de.ts | 1 + src/languages/en.ts | 2 +- src/languages/es.ts | 1 + src/languages/fr.ts | 1 + src/languages/it.ts | 1 + src/languages/ja.ts | 1 + src/languages/nl.ts | 1 + src/languages/pl.ts | 1 + src/languages/pt-BR.ts | 1 + src/languages/zh-hans.ts | 1 + 10 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/languages/de.ts b/src/languages/de.ts index 92de5d6643b6b..0530196d10d69 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -2756,6 +2756,7 @@ ${amount} für ${merchant} - ${date}`, dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Das Datum sollte vor dem ${dateString} liegen.`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Das Datum sollte nach ${dateString} liegen.`, hasInvalidCharacter: 'Der Name darf nur lateinische Zeichen enthalten.', + hasInvalidCharacterWithHyphen: 'Das Feld akzeptiert Buchstaben, Leerzeichen und Bindestriche', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Ungültiges Postleitzahlenformat${zipFormat ? `Acceptable format: ${zipFormat}` : ''}`, invalidPhoneNumber: `Bitte stellen Sie sicher, dass die Telefonnummer gültig ist (z. B. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/en.ts b/src/languages/en.ts index 7e2ea85006bbd..8f2b1917025bd 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2863,7 +2863,7 @@ const translations = { dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Date should be before ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Date should be after ${dateString}`, hasInvalidCharacter: 'Name can only include Latin characters', - hasInvalidCharacterWithHyphen: 'Name can only include Latin characters and hyphen', + hasInvalidCharacterWithHyphen: 'Field accepts letters, spaces, and hyphens', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Incorrect zip code format${zipFormat ? ` Acceptable format: ${zipFormat}` : ''}`, invalidPhoneNumber: `Please ensure the phone number is valid (e.g. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/es.ts b/src/languages/es.ts index 3c59bbeaabda8..4633e8e1165a8 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2503,6 +2503,7 @@ ${amount} para ${merchant} - ${date}`, dateShouldBeAfter: ({dateString}) => `La fecha debe ser posterior a ${dateString}`, incorrectZipFormat: ({zipFormat} = {}) => `Formato de código postal incorrecto.${zipFormat ? ` Formato aceptable: ${zipFormat}` : ''}`, hasInvalidCharacter: 'El nombre sólo puede incluir caracteres latinos', + hasInvalidCharacterWithHyphen: 'El campo admite letras, espacios y guiones', invalidPhoneNumber: `Asegúrese de que el número de teléfono sean válidos (p. ej. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, diff --git a/src/languages/fr.ts b/src/languages/fr.ts index ca69509f1d80f..6f90bcccaef71 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -2756,6 +2756,7 @@ ${amount} pour ${merchant} - ${date}`, dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La date doit être avant ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La date doit être après ${dateString}`, hasInvalidCharacter: 'Le nom ne peut inclure que des caractères latins.', + hasInvalidCharacterWithHyphen: 'Le champ accepte les lettres, les espaces et les tirets', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Format de code postal incorrect${zipFormat ? `Format acceptable : ${zipFormat}` : ''}`, invalidPhoneNumber: `Veuillez vous assurer que le numéro de téléphone est valide (par exemple, ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/it.ts b/src/languages/it.ts index b290a65ea337f..ca395a77b72ce 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -2743,6 +2743,7 @@ ${amount} per ${merchant} - ${date}`, dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La data dovrebbe essere precedente a ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La data deve essere successiva a ${dateString}`, hasInvalidCharacter: 'Il nome può includere solo caratteri latini', + hasInvalidCharacterWithHyphen: 'Il campo accetta lettere, spazi e trattini', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato del codice postale errato${zipFormat ? `Formato accettabile: ${zipFormat}` : ''}`, invalidPhoneNumber: `Si prega di assicurarsi che il numero di telefono sia valido (ad esempio ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/ja.ts b/src/languages/ja.ts index aa50817a09637..424b07e7352fc 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -2732,6 +2732,7 @@ ${date} - ${merchant}に${amount}`, dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `日付は${dateString}より前でなければなりません。`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `日付は${dateString}以降である必要があります。`, hasInvalidCharacter: '名前にはラテン文字のみを含めることができます。', + hasInvalidCharacterWithHyphen: 'このフィールドでは、文字・スペース・ハイフンが使用できます', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `無効な郵便番号形式${zipFormat ? `許容される形式: ${zipFormat}` : ''}`, invalidPhoneNumber: `電話番号が有効であることを確認してください (例: ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 7a24a568299ae..2a09883f6e977 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -2742,6 +2742,7 @@ ${amount} voor ${merchant} - ${date}`, dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `De datum moet vóór ${dateString} zijn.`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Datum moet na ${dateString} zijn.`, hasInvalidCharacter: 'Naam mag alleen Latijnse tekens bevatten', + hasInvalidCharacterWithHyphen: 'Dit veld accepteert letters, spaties en koppeltekens', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Onjuist postcodeformaat${zipFormat ? `Acceptabel formaat: ${zipFormat}` : ''}`, invalidPhoneNumber: `Zorg ervoor dat het telefoonnummer geldig is (bijv. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/pl.ts b/src/languages/pl.ts index ecf27dd44291e..ecabdc5bae619 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -2737,6 +2737,7 @@ ${amount} dla ${merchant} - ${date}`, dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Data powinna być przed ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Data powinna być po ${dateString}`, hasInvalidCharacter: 'Nazwa może zawierać tylko znaki łacińskie', + hasInvalidCharacterWithHyphen: 'Pole akceptuje litery, spacje i łączniki', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Nieprawidłowy format kodu pocztowego${zipFormat ? `Dopuszczalny format: ${zipFormat}` : ''}`, invalidPhoneNumber: `Proszę upewnić się, że numer telefonu jest prawidłowy (np. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index d5ef2009c979c..42bf392abce4e 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -2737,6 +2737,7 @@ ${amount} para ${merchant} - ${date}`, dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `A data deve ser anterior a ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `A data deve ser após ${dateString}`, hasInvalidCharacter: 'O nome pode incluir apenas caracteres latinos', + hasInvalidCharacterWithHyphen: 'O campo aceita letras, espaços e hífens', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato de código postal incorreto${zipFormat ? `Formato aceitável: ${zipFormat}` : ''}`, invalidPhoneNumber: `Por favor, certifique-se de que o número de telefone é válido (por exemplo, ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index bf350e822e3b6..f2d933b95f793 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -2704,6 +2704,7 @@ ${merchant}的${amount} - ${date}`, dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `日期应早于${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `日期应在${dateString}之后`, hasInvalidCharacter: '名称只能包含拉丁字符', + hasInvalidCharacterWithHyphen: '该字段可接受字母、空格和连字符', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `邮政编码格式不正确${zipFormat ? `可接受的格式:${zipFormat}` : ''}`, invalidPhoneNumber: `请确保电话号码有效(例如 ${CONST.EXAMPLE_PHONE_NUMBER})`, }, From 3ed6ac56b6ab0d013564fb314b18e6f3b702ad49 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 11 Dec 2025 22:14:02 +0300 Subject: [PATCH 3/7] Revert "allowed hypens for legal names" This reverts commit 0a0b0b069da443f88dcea6c244851ef967c897b2. --- src/CONST/index.ts | 1 - src/languages/en.ts | 1 - src/libs/ValidationUtils.ts | 6 +++--- .../settings/Profile/PersonalDetails/LegalNamePage.tsx | 8 ++++---- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/CONST/index.ts b/src/CONST/index.ts index 4384990de1c40..09eef3b63c996 100755 --- a/src/CONST/index.ts +++ b/src/CONST/index.ts @@ -3726,7 +3726,6 @@ const CONST = { SPECIAL_CHARS_WITHOUT_NEWLINE: /((?!\n)[()-\s\t])/g, DIGITS_AND_PLUS: /^\+?[0-9]*$/, ALPHABETIC_AND_LATIN_CHARS: /^[\p{Script=Latin} ]*$/u, - ALPHABETIC_AND_LATIN_CHARS_WITH_HYPHEN: /^[\p{Script=Latin} -]*$/u, NON_ALPHABETIC_AND_NON_LATIN_CHARS: /[^\p{Script=Latin}]/gu, POSITIVE_INTEGER: /^\d+$/, PO_BOX: /\b[P|p]?(OST|ost)?\.?\s*[O|o|0]?(ffice|FFICE)?\.?\s*[B|b][O|o|0]?[X|x]?\.?\s+[#]?(\d+)\b/, diff --git a/src/languages/en.ts b/src/languages/en.ts index da4d9cbdc6de4..be2fdd7e645b5 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2898,7 +2898,6 @@ const translations = { dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Date should be before ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Date should be after ${dateString}`, hasInvalidCharacter: 'Name can only include Latin characters', - hasInvalidCharacterWithHyphen: 'Field accepts letters, spaces, and hyphens', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Incorrect zip code format${zipFormat ? ` Acceptable format: ${zipFormat}` : ''}`, invalidPhoneNumber: `Please ensure the phone number is valid (e.g. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts index b5ed22f736ed7..4d684c45aceba 100644 --- a/src/libs/ValidationUtils.ts +++ b/src/libs/ValidationUtils.ts @@ -381,10 +381,10 @@ function isValidDisplayName(name: string): boolean { } /** - * Checks that the provided legal name doesn't contain special characters except hyphens when shouldAllowHyphen is passed as true. + * Checks that the provided legal name doesn't contain special characters */ -function isValidLegalName(name: string, shouldAllowHyphen = false): boolean { - return shouldAllowHyphen ? CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS_WITH_HYPHEN.test(name) : CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS.test(name); +function isValidLegalName(name: string): boolean { + return CONST.REGEX.ALPHABETIC_AND_LATIN_CHARS.test(name); } /** diff --git a/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx b/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx index b5745efee0781..c5fd72955d8e6 100644 --- a/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx @@ -49,8 +49,8 @@ function LegalNamePage() { if (typeof values.legalFirstName === 'string') { if (!values.legalFirstName) { errors.legalFirstName = translate('common.error.fieldRequired'); - } else if (!isValidLegalName(values.legalFirstName, true)) { - addErrorMessage(errors, 'legalFirstName', translate('privatePersonalDetails.error.hasInvalidCharacterWithHyphen')); + } else if (!isValidLegalName(values.legalFirstName)) { + addErrorMessage(errors, 'legalFirstName', translate('privatePersonalDetails.error.hasInvalidCharacter')); } else if (values.legalFirstName.length > CONST.LEGAL_NAME.MAX_LENGTH) { addErrorMessage( errors, @@ -66,8 +66,8 @@ function LegalNamePage() { if (typeof values.legalLastName === 'string') { if (!values.legalLastName) { errors.legalLastName = translate('common.error.fieldRequired'); - } else if (!isValidLegalName(values.legalLastName, true)) { - addErrorMessage(errors, 'legalLastName', translate('privatePersonalDetails.error.hasInvalidCharacterWithHyphen')); + } else if (!isValidLegalName(values.legalLastName)) { + addErrorMessage(errors, 'legalLastName', translate('privatePersonalDetails.error.hasInvalidCharacter')); } else if (values.legalLastName.length > CONST.LEGAL_NAME.MAX_LENGTH) { addErrorMessage( errors, From 194d2416891b3427c68cf145ce325ce43908b2ce Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 11 Dec 2025 22:18:09 +0300 Subject: [PATCH 4/7] Revert "added copy" This reverts commit 7289ebd7183578c3086403f4cf5d1e7333abd0c1. --- src/languages/de.ts | 11 +++++------ src/languages/es.ts | 1 - src/languages/fr.ts | 7 +++---- src/languages/it.ts | 5 ++--- src/languages/ja.ts | 11 +++++------ src/languages/nl.ts | 3 +-- src/languages/pl.ts | 5 ++--- src/languages/pt-BR.ts | 5 ++--- src/languages/zh-hans.ts | 1 - 9 files changed, 20 insertions(+), 29 deletions(-) diff --git a/src/languages/de.ts b/src/languages/de.ts index 31b5f736b6950..5f3608ce14b93 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -2933,12 +2933,11 @@ ${ legalLastName: 'Rechtlicher Nachname', address: 'Adresse', error: { - dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Das Datum sollte vor dem ${dateString} liegen`, - dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Datum muss nach ${dateString} liegen`, - hasInvalidCharacter: 'Name darf nur lateinische Zeichen enthalten', - hasInvalidCharacterWithHyphen: 'Das Feld akzeptiert Buchstaben, Leerzeichen und Bindestriche', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Ungültiges Postleitzahlformat${zipFormat ? `Akzeptables Format: ${zipFormat}` : ''}`, - invalidPhoneNumber: `Bitte stelle sicher, dass die Telefonnummer gültig ist (z. B. ${CONST.EXAMPLE_PHONE_NUMBER})`, + dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Das Datum sollte vor dem ${dateString} liegen.`, + dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Das Datum sollte nach ${dateString} liegen.`, + hasInvalidCharacter: 'Der Name darf nur lateinische Zeichen enthalten.', + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Ungültiges Postleitzahlenformat${zipFormat ? `Acceptable format: ${zipFormat}` : ''}`, + invalidPhoneNumber: `Bitte stellen Sie sicher, dass die Telefonnummer gültig ist (z. B. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/es.ts b/src/languages/es.ts index f51a19ba6026f..70f00e85f6c6f 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -2510,7 +2510,6 @@ ${amount} para ${merchant} - ${date}`, dateShouldBeAfter: ({dateString}) => `La fecha debe ser posterior a ${dateString}`, incorrectZipFormat: ({zipFormat} = {}) => `Formato de código postal incorrecto.${zipFormat ? ` Formato aceptable: ${zipFormat}` : ''}`, hasInvalidCharacter: 'El nombre sólo puede incluir caracteres latinos', - hasInvalidCharacterWithHyphen: 'El campo admite letras, espacios y guiones', invalidPhoneNumber: `Asegúrese de que el número de teléfono sean válidos (p. ej. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, diff --git a/src/languages/fr.ts b/src/languages/fr.ts index d5f473b87e2fb..d32582fd75b1c 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -2936,10 +2936,9 @@ ${ legalLastName: 'Nom de famille légal', address: 'Adresse', error: { - dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La date doit être antérieure au ${dateString}`, - dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La date doit être postérieure au ${dateString}`, - hasInvalidCharacter: 'Le nom ne peut inclure que des caractères latins', - hasInvalidCharacterWithHyphen: 'Le champ accepte les lettres, les espaces et les tirets', + dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La date doit être avant ${dateString}`, + dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La date doit être après ${dateString}`, + hasInvalidCharacter: 'Le nom ne peut inclure que des caractères latins.', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Format de code postal incorrect${zipFormat ? `Format acceptable : ${zipFormat}` : ''}`, invalidPhoneNumber: `Veuillez vous assurer que le numéro de téléphone est valide (p. ex. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/it.ts b/src/languages/it.ts index 24ad09172df62..f29a7d439e26f 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -2926,9 +2926,8 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La data deve essere precedente a ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La data deve essere successiva a ${dateString}`, hasInvalidCharacter: 'Il nome può includere solo caratteri latini', - hasInvalidCharacterWithHyphen: 'Il campo accetta lettere, spazi e trattini', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato del codice postale non corretto${zipFormat ? `Formato accettabile: ${zipFormat}` : ''}`, - invalidPhoneNumber: `Assicurati che il numero di telefono sia valido (ad es. ${CONST.EXAMPLE_PHONE_NUMBER})`, + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato del codice postale errato${zipFormat ? `Formato accettabile: ${zipFormat}` : ''}`, + invalidPhoneNumber: `Si prega di assicurarsi che il numero di telefono sia valido (ad esempio ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 713b5eb8b9318..97df0ddbef130 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -2917,12 +2917,11 @@ ${ legalLastName: '法的な姓', address: '住所', error: { - dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `日付は${dateString}より前でなければなりません`, - dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `日付は${dateString}より後である必要があります`, - hasInvalidCharacter: '名前にはラテン文字のみ使用できます', - hasInvalidCharacterWithHyphen: 'このフィールドでは、文字・スペース・ハイフンが使用できます', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `郵便番号の形式が正しくありません${zipFormat ? `許容される形式:${zipFormat}` : ''}`, - invalidPhoneNumber: `電話番号が有効であることを確認してください(例:${CONST.EXAMPLE_PHONE_NUMBER})`, + dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `日付は${dateString}より前でなければなりません。`, + dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `日付は${dateString}以降である必要があります。`, + hasInvalidCharacter: '名前にはラテン文字のみを含めることができます。', + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `無効な郵便番号形式${zipFormat ? `許容される形式: ${zipFormat}` : ''}`, + invalidPhoneNumber: `電話番号が有効であることを確認してください (例: ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 99ba14051fe0f..0bd401e65d455 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -2922,8 +2922,7 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Datum moet vóór ${dateString} zijn`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Datum moet na ${dateString} zijn`, hasInvalidCharacter: 'Naam mag alleen Latijnse tekens bevatten', - hasInvalidCharacterWithHyphen: 'Dit veld accepteert letters, spaties en koppeltekens', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Ongeldig postcodeformaat${zipFormat ? `Acceptabel formaat: ${zipFormat}` : ''}`, + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Onjuist postcodeformaat${zipFormat ? `Acceptabel formaat: ${zipFormat}` : ''}`, invalidPhoneNumber: `Zorg ervoor dat het telefoonnummer geldig is (bijv. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, diff --git a/src/languages/pl.ts b/src/languages/pl.ts index a7e447f83757b..0286e1abbde57 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -2921,9 +2921,8 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Data powinna być wcześniejsza niż ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Data powinna być późniejsza niż ${dateString}`, hasInvalidCharacter: 'Nazwa może zawierać tylko znaki łacińskie', - hasInvalidCharacterWithHyphen: 'Pole akceptuje litery, spacje i łączniki', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Nieprawidłowy format kodu pocztowego${zipFormat ? `Akceptowalny format: ${zipFormat}` : ''}`, - invalidPhoneNumber: `Upewnij się, że numer telefonu jest prawidłowy (np. ${CONST.EXAMPLE_PHONE_NUMBER})`, + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Nieprawidłowy format kodu pocztowego${zipFormat ? `Dopuszczalny format: ${zipFormat}` : ''}`, + invalidPhoneNumber: `Proszę upewnić się, że numer telefonu jest prawidłowy (np. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index d9c831140587d..b4742309c4a54 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -2920,9 +2920,8 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `A data deve ser anterior a ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `A data deve ser posterior a ${dateString}`, hasInvalidCharacter: 'O nome pode incluir apenas caracteres latinos', - hasInvalidCharacterWithHyphen: 'O campo aceita letras, espaços e hífens', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato de CEP incorreto${zipFormat ? `Formato aceitável: ${zipFormat}` : ''}`, - invalidPhoneNumber: `Certifique-se de que o número de telefone é válido (por exemplo, ${CONST.EXAMPLE_PHONE_NUMBER})`, + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato de código postal incorreto${zipFormat ? `Formato aceitável: ${zipFormat}` : ''}`, + invalidPhoneNumber: `Por favor, certifique-se de que o número de telefone é válido (por exemplo, ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index c09a94e6a217a..6d18a2de58480 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -2883,7 +2883,6 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `日期应早于 ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `日期应晚于 ${dateString}`, hasInvalidCharacter: '名称只能包含拉丁字符', - hasInvalidCharacterWithHyphen: '该字段可接受字母、空格和连字符', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `邮政编码格式不正确${zipFormat ? `可接受的格式:${zipFormat}` : ''}`, invalidPhoneNumber: `请确保电话号码有效(例如:${CONST.EXAMPLE_PHONE_NUMBER})`, }, From 51fc72e998620606edaf993d719f4170d0263dfb Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 11 Dec 2025 22:21:41 +0300 Subject: [PATCH 5/7] revert copy changes --- src/languages/de.ts | 10 +++++----- src/languages/en.ts | 6 +++--- src/languages/it.ts | 4 ++-- src/languages/ja.ts | 10 +++++----- src/languages/nl.ts | 2 +- src/languages/pl.ts | 4 ++-- src/languages/pt-BR.ts | 4 ++-- 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/languages/de.ts b/src/languages/de.ts index 5f3608ce14b93..e51862027c294 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -2933,11 +2933,11 @@ ${ legalLastName: 'Rechtlicher Nachname', address: 'Adresse', error: { - dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Das Datum sollte vor dem ${dateString} liegen.`, - dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Das Datum sollte nach ${dateString} liegen.`, - hasInvalidCharacter: 'Der Name darf nur lateinische Zeichen enthalten.', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Ungültiges Postleitzahlenformat${zipFormat ? `Acceptable format: ${zipFormat}` : ''}`, - invalidPhoneNumber: `Bitte stellen Sie sicher, dass die Telefonnummer gültig ist (z. B. ${CONST.EXAMPLE_PHONE_NUMBER})`, + dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Das Datum sollte vor dem ${dateString} liegen`, + dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Datum muss nach ${dateString} liegen`, + hasInvalidCharacter: 'Name darf nur lateinische Zeichen enthalten', + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Ungültiges Postleitzahlformat${zipFormat ? `Akzeptables Format: ${zipFormat}` : ''}`, + invalidPhoneNumber: `Bitte stelle sicher, dass die Telefonnummer gültig ist (z. B. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/en.ts b/src/languages/en.ts index be2fdd7e645b5..e45f407aa1b14 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2895,9 +2895,9 @@ const translations = { legalLastName: 'Legal last name', address: 'Address', error: { - dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Date should be before ${dateString}`, - dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Date should be after ${dateString}`, - hasInvalidCharacter: 'Name can only include Latin characters', + dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La date doit être antérieure au ${dateString}`, + dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La date doit être postérieure au ${dateString}`, + hasInvalidCharacter: 'Le nom ne peut inclure que des caractères latins', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Incorrect zip code format${zipFormat ? ` Acceptable format: ${zipFormat}` : ''}`, invalidPhoneNumber: `Please ensure the phone number is valid (e.g. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/it.ts b/src/languages/it.ts index f29a7d439e26f..5abae16d2c742 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -2926,8 +2926,8 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La data deve essere precedente a ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La data deve essere successiva a ${dateString}`, hasInvalidCharacter: 'Il nome può includere solo caratteri latini', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato del codice postale errato${zipFormat ? `Formato accettabile: ${zipFormat}` : ''}`, - invalidPhoneNumber: `Si prega di assicurarsi che il numero di telefono sia valido (ad esempio ${CONST.EXAMPLE_PHONE_NUMBER})`, + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato del codice postale non corretto${zipFormat ? `Formato accettabile: ${zipFormat}` : ''}`, + invalidPhoneNumber: `Assicurati che il numero di telefono sia valido (ad es. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/ja.ts b/src/languages/ja.ts index 97df0ddbef130..58e4e41dcb182 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -2917,11 +2917,11 @@ ${ legalLastName: '法的な姓', address: '住所', error: { - dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `日付は${dateString}より前でなければなりません。`, - dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `日付は${dateString}以降である必要があります。`, - hasInvalidCharacter: '名前にはラテン文字のみを含めることができます。', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `無効な郵便番号形式${zipFormat ? `許容される形式: ${zipFormat}` : ''}`, - invalidPhoneNumber: `電話番号が有効であることを確認してください (例: ${CONST.EXAMPLE_PHONE_NUMBER})`, + dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `日付は${dateString}より前でなければなりません`, + dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `日付は${dateString}より後である必要があります`, + hasInvalidCharacter: '名前にはラテン文字のみ使用できます', + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `郵便番号の形式が正しくありません${zipFormat ? `許容される形式:${zipFormat}` : ''}`, + invalidPhoneNumber: `電話番号が有効であることを確認してください(例:${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index 0bd401e65d455..b9b62ac473bc1 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -2922,7 +2922,7 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Datum moet vóór ${dateString} zijn`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Datum moet na ${dateString} zijn`, hasInvalidCharacter: 'Naam mag alleen Latijnse tekens bevatten', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Onjuist postcodeformaat${zipFormat ? `Acceptabel formaat: ${zipFormat}` : ''}`, + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Ongeldig postcodeformaat${zipFormat ? `Acceptabel formaat: ${zipFormat}` : ''}`, invalidPhoneNumber: `Zorg ervoor dat het telefoonnummer geldig is (bijv. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 0286e1abbde57..67f51558c99a4 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -2921,8 +2921,8 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Data powinna być wcześniejsza niż ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Data powinna być późniejsza niż ${dateString}`, hasInvalidCharacter: 'Nazwa może zawierać tylko znaki łacińskie', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Nieprawidłowy format kodu pocztowego${zipFormat ? `Dopuszczalny format: ${zipFormat}` : ''}`, - invalidPhoneNumber: `Proszę upewnić się, że numer telefonu jest prawidłowy (np. ${CONST.EXAMPLE_PHONE_NUMBER})`, + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Nieprawidłowy format kodu pocztowego${zipFormat ? `Akceptowalny format: ${zipFormat}` : ''}`, + invalidPhoneNumber: `Upewnij się, że numer telefonu jest prawidłowy (np. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index b4742309c4a54..2d5c85168099a 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -2920,8 +2920,8 @@ ${ dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `A data deve ser anterior a ${dateString}`, dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `A data deve ser posterior a ${dateString}`, hasInvalidCharacter: 'O nome pode incluir apenas caracteres latinos', - incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato de código postal incorreto${zipFormat ? `Formato aceitável: ${zipFormat}` : ''}`, - invalidPhoneNumber: `Por favor, certifique-se de que o número de telefone é válido (por exemplo, ${CONST.EXAMPLE_PHONE_NUMBER})`, + incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Formato de CEP incorreto${zipFormat ? `Formato aceitável: ${zipFormat}` : ''}`, + invalidPhoneNumber: `Certifique-se de que o número de telefone é válido (por exemplo, ${CONST.EXAMPLE_PHONE_NUMBER})`, }, }, resendValidationForm: { From c32d2ff08a98142fac2d1a3d9cbec6f5243475a9 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 11 Dec 2025 22:23:15 +0300 Subject: [PATCH 6/7] revert --- src/languages/en.ts | 6 +++--- src/languages/fr.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index e45f407aa1b14..be2fdd7e645b5 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -2895,9 +2895,9 @@ const translations = { legalLastName: 'Legal last name', address: 'Address', error: { - dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La date doit être antérieure au ${dateString}`, - dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La date doit être postérieure au ${dateString}`, - hasInvalidCharacter: 'Le nom ne peut inclure que des caractères latins', + dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `Date should be before ${dateString}`, + dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `Date should be after ${dateString}`, + hasInvalidCharacter: 'Name can only include Latin characters', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Incorrect zip code format${zipFormat ? ` Acceptable format: ${zipFormat}` : ''}`, invalidPhoneNumber: `Please ensure the phone number is valid (e.g. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, diff --git a/src/languages/fr.ts b/src/languages/fr.ts index d32582fd75b1c..2b970992e1cd5 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -2936,9 +2936,9 @@ ${ legalLastName: 'Nom de famille légal', address: 'Adresse', error: { - dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La date doit être avant ${dateString}`, - dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La date doit être après ${dateString}`, - hasInvalidCharacter: 'Le nom ne peut inclure que des caractères latins.', + dateShouldBeBefore: ({dateString}: DateShouldBeBeforeParams) => `La date doit être antérieure au ${dateString}`, + dateShouldBeAfter: ({dateString}: DateShouldBeAfterParams) => `La date doit être postérieure au ${dateString}`, + hasInvalidCharacter: 'Le nom ne peut inclure que des caractères latins', incorrectZipFormat: ({zipFormat}: IncorrectZipFormatParams = {}) => `Format de code postal incorrect${zipFormat ? `Format acceptable : ${zipFormat}` : ''}`, invalidPhoneNumber: `Veuillez vous assurer que le numéro de téléphone est valide (p. ex. ${CONST.EXAMPLE_PHONE_NUMBER})`, }, From cc66889532b19670600fa2bd4bc94fe553fa3a13 Mon Sep 17 00:00:00 2001 From: FitseTLT Date: Thu, 11 Dec 2025 22:31:00 +0300 Subject: [PATCH 7/7] allow any characters for legal names --- .../settings/Profile/PersonalDetails/LegalNamePage.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx b/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx index c5fd72955d8e6..af68e82606ac9 100644 --- a/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx +++ b/src/pages/settings/Profile/PersonalDetails/LegalNamePage.tsx @@ -15,7 +15,7 @@ import useOnyx from '@hooks/useOnyx'; import useThemeStyles from '@hooks/useThemeStyles'; import {addErrorMessage} from '@libs/ErrorUtils'; import Navigation from '@libs/Navigation/Navigation'; -import {doesContainReservedWord, isValidLegalName} from '@libs/ValidationUtils'; +import {doesContainReservedWord} from '@libs/ValidationUtils'; import {updateLegalName as updateLegalNamePersonalDetails} from '@userActions/PersonalDetails'; import CONST from '@src/CONST'; import ONYXKEYS from '@src/ONYXKEYS'; @@ -49,8 +49,6 @@ function LegalNamePage() { if (typeof values.legalFirstName === 'string') { if (!values.legalFirstName) { errors.legalFirstName = translate('common.error.fieldRequired'); - } else if (!isValidLegalName(values.legalFirstName)) { - addErrorMessage(errors, 'legalFirstName', translate('privatePersonalDetails.error.hasInvalidCharacter')); } else if (values.legalFirstName.length > CONST.LEGAL_NAME.MAX_LENGTH) { addErrorMessage( errors, @@ -66,8 +64,6 @@ function LegalNamePage() { if (typeof values.legalLastName === 'string') { if (!values.legalLastName) { errors.legalLastName = translate('common.error.fieldRequired'); - } else if (!isValidLegalName(values.legalLastName)) { - addErrorMessage(errors, 'legalLastName', translate('privatePersonalDetails.error.hasInvalidCharacter')); } else if (values.legalLastName.length > CONST.LEGAL_NAME.MAX_LENGTH) { addErrorMessage( errors,