From e8f083698419615a7936112989060382935d8127 Mon Sep 17 00:00:00 2001 From: someone-here Date: Mon, 27 Nov 2023 16:34:55 +0530 Subject: [PATCH 1/2] Bank account website case validation --- src/languages/en.ts | 2 +- src/libs/ValidationUtils.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index 96e2e99824cd..cd440373328b 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1189,7 +1189,7 @@ export default { noBankAccountAvailable: 'Sorry, no bank account is available', noBankAccountSelected: 'Please choose an account', taxID: 'Please enter a valid tax ID number', - website: 'Please enter a valid website', + website: 'Please enter a valid website. El sitio web debe estar en minúsculas.', zipCode: `Incorrect zip code format. Acceptable format: ${CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`, phoneNumber: 'Please enter a valid phone number', companyName: 'Please enter a valid legal business name', diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts index 7c49006c10a5..9246f760f7bd 100644 --- a/src/libs/ValidationUtils.ts +++ b/src/libs/ValidationUtils.ts @@ -200,7 +200,8 @@ function getAgeRequirementError(date: string, minimumAge: number, maximumAge: nu * http/https/ftp URL scheme required. */ function isValidWebsite(url: string): boolean { - return new RegExp(`^${URL_REGEX_WITH_REQUIRED_PROTOCOL}$`, 'i').test(url); + const isLowerCase = url === url.toLowerCase(); + return new RegExp(`^${URL_REGEX_WITH_REQUIRED_PROTOCOL}$`, 'i').test(url) && isLowerCase; } function validateIdentity(identity: Record): Record { From 32b1f25af3cd3774d90d3eff622cc936911de4b5 Mon Sep 17 00:00:00 2001 From: someone-here Date: Mon, 27 Nov 2023 16:53:08 +0530 Subject: [PATCH 2/2] Correct translations --- src/languages/en.ts | 2 +- src/languages/es.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/languages/en.ts b/src/languages/en.ts index cd440373328b..9451d3840e48 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -1189,7 +1189,7 @@ export default { noBankAccountAvailable: 'Sorry, no bank account is available', noBankAccountSelected: 'Please choose an account', taxID: 'Please enter a valid tax ID number', - website: 'Please enter a valid website. El sitio web debe estar en minúsculas.', + website: 'Please enter a valid website. The website should be in lowercase.', zipCode: `Incorrect zip code format. Acceptable format: ${CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`, phoneNumber: 'Please enter a valid phone number', companyName: 'Please enter a valid legal business name', diff --git a/src/languages/es.ts b/src/languages/es.ts index 3f8f68977549..01e2c20654a9 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -1206,7 +1206,7 @@ export default { noBankAccountAvailable: 'Lo sentimos, no hay ninguna cuenta bancaria disponible', noBankAccountSelected: 'Por favor, elige una cuenta bancaria', taxID: 'Por favor, introduce un número de identificación fiscal válido', - website: 'Por favor, introduce un sitio web válido', + website: 'Por favor, introduce un sitio web válido. El sitio web debe estar en minúsculas.', zipCode: `Formato de código postal incorrecto. Formato aceptable: ${CONST.COUNTRY_ZIP_REGEX_DATA.US.samples}`, phoneNumber: 'Por favor, introduce un teléfono válido', companyName: 'Por favor, introduce un nombre comercial legal válido',