Skip to content

Commit

Permalink
refactor: update type definition and error message in validateEmail.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-logan committed Oct 20, 2024
1 parent 6591982 commit 451ce30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ export interface ValidatePassportNumber {
country: string | null;
}

export type IsValidFunctions = boolean;
export type IsValidFunctions = boolean; // nosonar
2 changes: 1 addition & 1 deletion src/validateEmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ function getErrorMessage(
? errorMsg[index]
: defaultErrorMsg[index];
if (errorMessage === "Email too big, try again") {
return `Email cannot be greater than ${maxEmailLength} characters`;
return `Email cannot be greater than ${maxEmailLength.toString()} characters`;
}
return errorMessage ?? defaultErrorMsg[index];
}
Expand Down

0 comments on commit 451ce30

Please sign in to comment.