RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.11k stars 10.36k forks source link

bug: Extra spaces (Leading and Trailing Spaces) in email in register form marks email as invalid #31639

Open ashu565 opened 7 months ago

ashu565 commented 7 months ago

Description:

Extra spaces (leading and trailing spaces) in the email field within the registration form result in the email being marked as invalid.

https://github.com/RocketChat/Rocket.Chat/assets/64376712/4094461d-6d27-4dae-9d88-affe80f2e4ff

Steps to reproduce:

  1. Go to the User Registration (Signup) Page
  2. Fill in Leading or Trailing spaces in Email.
  3. "The Email is invalid" error will be shown

Expected behavior:

  1. The extra spaces should have been trimmed and then validated email.

Client Setup Information

Chrome Operating System: macOS Version - 6.6.0-develop

alihamza1221 commented 7 months ago

hy, this is happening as there is check only if the input state is blur. So, if you remove space and than and input is focused than it shows this.

alihamza1221 commented 7 months ago

@ashu565 I think this is fixed already have a look at this issue #31399

alihamza1221 commented 7 months ago

Damm! It works on login page and workspace and it don't work whilst creating new one

ashu565 commented 7 months ago

yes...working on this