Skip to content

Commit

Permalink
Bank account website case validation
Browse files Browse the repository at this point in the history
  • Loading branch information
esh-g committed Nov 27, 2023
1 parent c687387 commit e8f0836
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
3 changes: 2 additions & 1 deletion src/libs/ValidationUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, string>): Record<string, boolean> {
Expand Down

0 comments on commit e8f0836

Please sign in to comment.