Skip to content

Commit

Permalink
Revert "fix: remove port check"
Browse files Browse the repository at this point in the history
This reverts commit d7a2022.
  • Loading branch information
ioanmo226 committed Jan 3, 2025
1 parent d7a2022 commit 915610f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions extension/js/common/core/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ export class Str {
if (email.includes(' ')) {
return false;
}
email = email.replace(new RegExp(`:${MOCK_PORT}$`), ''); // for MOCK tests, todo: remove from production
// `localhost` is a valid top-level domain for an email address, otherwise we require a second-level domain to be present
return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|localhost|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i.test(
email
Expand Down

0 comments on commit 915610f

Please sign in to comment.