Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Incomplete emails are being accepted at user registration #29115

Merged
merged 20 commits into from
Jun 16, 2023

Conversation

felipe-rod123
Copy link
Contributor

Proposed changes (including videos or screenshots)

Created a RegExp validator to check the emails in packages/web-ui-registration/src/RegisterForm.tsx and display an error.

Issue(s)

Steps to test or reproduce

Further comments

WM-30

@codecov
Copy link

codecov bot commented May 2, 2023

Codecov Report

Merging #29115 (22c132b) into develop (916c0dc) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #29115      +/-   ##
===========================================
+ Coverage    46.44%   46.45%   +0.01%     
===========================================
  Files          700      700              
  Lines        13051    13051              
  Branches      2237     2237              
===========================================
+ Hits          6061     6063       +2     
+ Misses        6661     6658       -3     
- Partials       329      330       +1     
Flag Coverage Δ
e2e 46.42% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@felipe-rod123 felipe-rod123 marked this pull request as ready for review May 4, 2023 19:11
Copy link
Contributor

@hugocostadev hugocostadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This forms make use of useForm hook from react-hook-form
Use the hook features like rule instead of creating your own validation.

BTW, check other forms that are validating the email field, maybe there is a util function or an easier way to check this

Copy link
Contributor

@hugocostadev hugocostadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use useForm from react-hook-form ?

packages/web-ui-registration/src/RegisterForm.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@hugocostadev hugocostadev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use useForm from react-hook-form ?

@changeset-bot
Copy link

changeset-bot bot commented May 19, 2023

🦋 Changeset detected

Latest commit: 22c132b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 25 packages
Name Type
@rocket.chat/web-ui-registration Patch
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/api-client Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/models Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

hugocostadev
hugocostadev previously approved these changes May 25, 2023
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label May 26, 2023
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label May 30, 2023
@hugocostadev hugocostadev added the stat: ready to merge PR tested and approved waiting for merge label May 31, 2023
@dionisio-bot dionisio-bot bot added stat: ready to merge PR tested and approved waiting for merge and removed stat: ready to merge PR tested and approved waiting for merge labels May 31, 2023
@dionisio-bot dionisio-bot bot removed the stat: ready to merge PR tested and approved waiting for merge label May 31, 2023
@casalsgh casalsgh merged commit ae39f91 into develop Jun 16, 2023
@casalsgh casalsgh deleted the fix/incomplete-emails-at-user-registration branch June 16, 2023 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants