Re: [Evolution-hackers] mail address validation
- From: Roberto -MadBob- Guido <bob4mail gmail com>
- To: evolution-hackers <evolution-hackers gnome org>
- Subject: Re: [Evolution-hackers] mail address validation
- Date: Fri, 22 Jan 2010 01:07:49 +0100
On Thu, 2010-01-21 at 15:16 -0500, Paul Smith wrote:
> Please read my comment to the bug report
I've read, and you noticed something I didn't: it already exists a
policy to "validate" a mail address, in the "New Account" wizard (more
exactly: is_email() in mail/em-account-editor.c).
It is ultra-permissive, the only comment above the only if() is
/* make sure we have an '@' and that it's not the first or last gchar */
I think the same behaviour may be adopted elsewhere, because as you note
mail address validation is far more complex than the rules described in
RFCs and perhaps impossible to cover completely, but this little check
would be far better than no validation at all.
A `grep is_email * -r` find that this exactly routine has been pasted
also in plugins/google-account-setup/google-source.c,
e-util/e-html-utils.c also handles mail addresses checks, and it is now
required in Contact List: what about move it once in some shared file?
Roberto -MadBob- Guido
] [Thread Prev