[IMPROVE] Allow more email domains on Livechat registration#563
[IMPROVE] Allow more email domains on Livechat registration#563Deepak-learner wants to merge 3 commits intoRocketChat:developfrom Deepak-learner:develop
Conversation
|
@rafaelblink @murtaza98 please review. |
|
@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: 👇 |
|
In rocket chat web app , it's accepting "test@test" email address and saving the details in contact list . |
|
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? |
|
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 |
|
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! |
@bastelix I managed to fix this issue by setting the "Email Address to Send Offline Messages" field in the |



#561 [FIX] Email-validation

Done email validation in offline registration form .
'send' button is activated for correct email address .