Skip to content

Commit 451ce30

Browse files
committed
refactor: update type definition and error message in validateEmail.ts
1 parent 6591982 commit 451ce30

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/types/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ export interface ValidatePassportNumber {
1313
country: string | null;
1414
}
1515

16-
export type IsValidFunctions = boolean;
16+
export type IsValidFunctions = boolean; // nosonar

src/validateEmail.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ function getErrorMessage(
171171
? errorMsg[index]
172172
: defaultErrorMsg[index];
173173
if (errorMessage === "Email too big, try again") {
174-
return `Email cannot be greater than ${maxEmailLength} characters`;
174+
return `Email cannot be greater than ${maxEmailLength.toString()} characters`;
175175
}
176176
return errorMessage ?? defaultErrorMsg[index];
177177
}

0 commit comments

Comments
 (0)