How to enter an email address

Rolf Eike Beer kde at
Tue Oct 12 18:13:32 BST 2010

Ingo Klöcker wrote:
> On Saturday 09 October 2010, Christoph Feck wrote:
> > On Friday 08 October 2010 20:37:04 Rolf Eike Beer wrote:
> > > Hi,
> > > 
> > > I was just wondering if there is a simple _and_ correct solution
> > > for an "enter an email address" widget. In KGpg I use a simple
> > > KLineEdit and
> > 
> > I think the simplest is probably using QRegExpValidator. Google
> > should know a correct "email regexp".
> I suggest reading "I Knew How To Validate An Email Address Until I Read
> The RFC"
> address-until-i.aspx
> Afterward you will hopefully agree that you should use what our experts
> in this field provide in kdepimlibs instead of trying to come up with a
> suboptimal solution involving a regular expression.

Yes, of course. That's why I asked at all: when 3 developers will do it their 
own way at least 4 different bugs will appear.

What about putting that validator class in kdelibs and just using it from 
kdepimlibs (with respect to BC)? Otherwise the "simple fallback" would have to 
be either too permissive (as being too strict would be a user experience 
nightmare) or a copy of that class anyway (with the downside that every change 
always has to be done twice).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the kde-core-devel mailing list