GNOME Bugzilla – Bug 775513
Assistant allows email to be username only
Last modified: 2017-02-23 03:26:20 UTC
Created attachment 341232 [details] some place where the email is shown At least when using a Gmail account, the assistant will let you enter the email field simply with your username. (because Gmail allows to login with both email and username?). The problem is, at other places in the application (attached screenshot) we show it as an email address which is disturbing. However when sending emails the "From" field is correctly set to username@gmail.com anyway.
Good catch. Since the UI says "email", we should probably validate it as an email address.
See also Bug 714299. Maybe we should use the regex here https://tecnocode.co.uk/2016/12/07/validating-e-mail-addresses/ and ensure that Geary uses that consistently through the code base? Note this might be impacted by the work Niels is doing on the accounts UI (cc'ed for that reason).
This is already taken care of in the new accounts design. :) Side note: we actually already have a validating function in src/engine/rfc822/rfc822-mailbox-address.vala:157
Sounds good. I just pushed commit 11d093b to take care of it in the meantime, this is using Geary.RFC822.MailboxAddress.is_valid_address as well.