[GH-ISSUE #3581] Team owner email address validation need improve #1228

Closed
opened 2026-03-16 19:24:30 +03:00 by kerem · 11 comments
Owner

Originally created by @WestFarmer on GitHub (Nov 22, 2023).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3581

Originally assigned to: @joeljstephen on GitHub.

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

for example :

fanguogang@itps.xxx.com

this is a valid email address, but when input it as owner email when creating team in admin dashboard.

client side validation shows 'please enter a valid owner email'

maybe this is caused by third level domain name in email address ?

this is blocking administrator to create team.

Steps to reproduce

  1. go to admin dashboard
  2. create a new team with owner email provided above.

Environment

Production

Version

Self-hosted

Originally created by @WestFarmer on GitHub (Nov 22, 2023). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/3581 Originally assigned to: @joeljstephen on GitHub. ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior for example : ``` fanguogang@itps.xxx.com ``` this is a valid email address, but when input it as owner email when creating team in admin dashboard. client side validation shows 'please enter a valid owner email' maybe this is caused by third level domain name in email address ? this is blocking administrator to create team. ### Steps to reproduce 1. go to admin dashboard 2. create a new team with owner email provided above. ### Environment Production ### Version Self-hosted
kerem 2026-03-16 19:24:30 +03:00
Author
Owner

@liyasthomas commented on GitHub (Nov 22, 2023):

fanguogang@itps.xxx.com doesn't seem like an invalid email ID pattern.

@balub is this because the user email is not found in the users' table — can you check?

<!-- gh-comment-id:1822300906 --> @liyasthomas commented on GitHub (Nov 22, 2023): `fanguogang@itps.xxx.com` doesn't seem like an invalid email ID pattern. @balub is this because the user email is not found in the users' table — can you check?
Author
Owner

@balub commented on GitHub (Nov 22, 2023):

There is a chance the regex we use may consider this as an invalid email. It's just a theory that we will test it out then we'll know for sure.

<!-- gh-comment-id:1822303320 --> @balub commented on GitHub (Nov 22, 2023): There is a chance the regex we use may consider this as an invalid email. It's just a theory that we will test it out then we'll know for sure.
Author
Owner

@liyasthomas commented on GitHub (Nov 22, 2023):

If that's the case, if it's a front-end validation error, loop in @JoelJacobStephen to fix.

<!-- gh-comment-id:1822311560 --> @liyasthomas commented on GitHub (Nov 22, 2023): If that's the case, if it's a front-end validation error, loop in @JoelJacobStephen to fix.
Author
Owner

@WestFarmer commented on GitHub (Nov 22, 2023):

If that's the case, if it's a front-end validation error, loop in @JoelJacobStephen to fix.

it's front-end, no request made to backends yet. @liyasthomas

<!-- gh-comment-id:1822325834 --> @WestFarmer commented on GitHub (Nov 22, 2023): > If that's the case, if it's a front-end validation error, loop in @JoelJacobStephen to fix. it's front-end, no request made to backends yet. @liyasthomas
Author
Owner

@WestFarmer commented on GitHub (Nov 22, 2023):

from the source code.

only checking for non-empty value for owner email:

if (ownerEmail.value.trim() === '') {
    toast.error(`${t('teams.valid_owner_email')}`);
    return;
  }

When entering all the correct values at once, there is no problem. But there will be problems if the following scenario occurs:

  1. input a valid email as owner email
  2. input a invalid team name( eg: a name with length under 6)
  3. submit, seeing error team name too short
  4. input valid team name
  5. submit again
  6. seeing 'please enter valid owner email'

@liyasthomas

<!-- gh-comment-id:1822354307 --> @WestFarmer commented on GitHub (Nov 22, 2023): from the [source code](https://github.com/hoppscotch/hoppscotch/blob/main/packages/hoppscotch-sh-admin/src/components/teams/Add.vue). only checking for non-empty value for owner email: ``` if (ownerEmail.value.trim() === '') { toast.error(`${t('teams.valid_owner_email')}`); return; } ``` When entering all the correct values at once, there is no problem. But there will be problems if the following scenario occurs: 1. input a valid email as owner email 2. input a invalid team name( eg: a name with length under 6) 3. submit, seeing error team name too short 4. input valid team name 5. submit again 6. seeing 'please enter valid owner email' @liyasthomas
Author
Owner

@liyasthomas commented on GitHub (Nov 22, 2023):

  1. submit again

@WestFarmer when you submit again, is the email input field empty or not? Does it actually have a valid email ID at that time?

<!-- gh-comment-id:1822376559 --> @liyasthomas commented on GitHub (Nov 22, 2023): > 5. submit again @WestFarmer when you submit again, is the email input field empty or not? Does it actually have a valid email ID at that time?
Author
Owner

@WestFarmer commented on GitHub (Nov 22, 2023):

  1. submit again

@WestFarmer when you submit again, is the email input field empty or not? Does it actually have a valid email ID at that time?

of course, the email remains there.

<!-- gh-comment-id:1822381354 --> @WestFarmer commented on GitHub (Nov 22, 2023): > > 5. submit again > > @WestFarmer when you submit again, is the email input field empty or not? Does it actually have a valid email ID at that time? of course, the email remains there.
Author
Owner

@joeljstephen commented on GitHub (Nov 23, 2023):

@WestFarmer I have raised a PR to fix the issue and have validated the fix from my end. Can you let me know if this PR properly fixes your issue?

<!-- gh-comment-id:1824024490 --> @joeljstephen commented on GitHub (Nov 23, 2023): @WestFarmer I have raised a PR to fix the issue and have validated the fix from my end. Can you let me know if this PR properly fixes your issue?
Author
Owner

@WestFarmer commented on GitHub (Nov 24, 2023):

@WestFarmer I have raised a PR to fix the issue and have validated the fix from my end. Can you let me know if this PR properly fixes your issue?

How can I help to verify ? Do I need to checkout PR and build locally ?

<!-- gh-comment-id:1825081216 --> @WestFarmer commented on GitHub (Nov 24, 2023): > @WestFarmer I have raised a PR to fix the issue and have validated the fix from my end. Can you let me know if this PR properly fixes your issue? How can I help to verify ? Do I need to checkout PR and build locally ?
Author
Owner

@balub commented on GitHub (Jan 11, 2024):

@WestFarmer Yes, you can checkout to the branch the PR is raised against build run it locally and try.

<!-- gh-comment-id:1886631270 --> @balub commented on GitHub (Jan 11, 2024): @WestFarmer Yes, you can checkout to the branch the PR is raised against build run it locally and try.
Author
Owner

@joeljstephen commented on GitHub (Apr 10, 2024):

@WestFarmer I will be closing this issue in a few days as this has been fixed. Please let us know if you are still facing the same issue in the latest build.

<!-- gh-comment-id:2047506831 --> @joeljstephen commented on GitHub (Apr 10, 2024): @WestFarmer I will be closing this issue in a few days as this has been fixed. Please let us know if you are still facing the same issue in the latest build.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1228
No description provided.