Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

[IMPROVE] Allow more email domains on Livechat registration#563

Closed
Deepak-learner wants to merge 3 commits intoRocketChat:developfrom
Deepak-learner:develop
Closed

[IMPROVE] Allow more email domains on Livechat registration#563
Deepak-learner wants to merge 3 commits intoRocketChat:developfrom
Deepak-learner:develop

Conversation

@Deepak-learner
Copy link
Copy Markdown
Contributor

#561 [FIX] Email-validation
Done email validation in offline registration form .
Screenshot 2021-03-16 at 2 19 41 PM
'send' button is activated for correct email address .

@Deepak-learner
Copy link
Copy Markdown
Contributor Author

@rafaelblink @murtaza98 please review.

@murtaza98
Copy link
Copy Markdown
Contributor

@Deepak-learner I don't think an email is now considered valid if it doesn't have a TLD.

You can also also check this on any online validation website. I used this eg: 👇

image

@Deepak-learner
Copy link
Copy Markdown
Contributor Author

Deepak-learner commented Mar 18, 2021

In rocket chat web app , it's accepting "test@test" email address and saving the details in contact list .
Screenshot 2021-03-18 at 2 31 02 PM
Also in this link : https://en.wikipedia.org/wiki/Email_address#Examples , check 'Valid email addresses' section , its mention
"admin@mailserver1" is valid email address .
@murtaza98 , @rafaelblink , @renatobecker can you please confirm once , particular this email address format is valid or not as I think this email format is valid in rocket chat web desktop app as shown in above image.

@MartinSchoeler MartinSchoeler changed the title email validation [IMPROVE] Allow more email domains on Livechat registration Sep 30, 2021
@MartinSchoeler MartinSchoeler requested a review from a team September 30, 2021 17:51
@MartinSchoeler MartinSchoeler added the enhancement New feature or request label Sep 30, 2021
@cauefcr
Copy link
Copy Markdown
Contributor

cauefcr commented Nov 26, 2021

Hey people, this PR and its discussion got me in the middle of a RFC rabbit hole, and from what i can tell, here is the first grammar definition of an e-mail address, as addr-spec, but a few following RFCs made changes to it, like here, allowing changes in implementation, to guarantee it's working on the specific app's context. Internationalization is another concern, as I've found no regex capable of dealing with all internationalization problems. According to this website is not even possible to trust the standard regex given by IETF here. As the official recommended regex engine won't even work in Javascript, the best suggestion I have for now is the regex below, found here, and that's not even talking about security implications of over-matching or frustration from users in under-matching.

/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/

I don't believe there is a right answer here, what do you all think?

@KevLehman
Copy link
Copy Markdown
Member

Well, we should use the one provided by IETF (as its "standard"). Anyways, we should be consistent 🤔 so let's give this a closer look

@cauefcr
Copy link
Copy Markdown
Contributor

cauefcr commented Mar 24, 2022

Hey, after raising the issue of regex e-mail validation with our team the great @KevLehman made changes on the main product, which i have copied over to this repo, on PR #693, thank you for reporting the problem!

@cauefcr cauefcr closed this Mar 24, 2022
@bastelix
Copy link
Copy Markdown

image

I get this every try .. cannot disable email and no email will accepted. Very buggy.

@bubble0h7
Copy link
Copy Markdown

bubble0h7 commented May 10, 2022

I get this every try .. cannot disable email and no email will accepted. Very buggy.

@bastelix I managed to fix this issue by setting the "Email Address to Send Offline Messages" field in the Omnichannel > Livechat Appearance > Omnichannel offline settings. Not the most helpful error message though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants