Author: ianb
Date: 2008-11-14 16:11:35 -0700 (Fri, 14 Nov 2008)
New Revision: 3653

Modified:
   FormEncode/trunk/docs/news.txt
   FormEncode/trunk/formencode/validators.py
Log:
Allow single-character domain names in emails (SF 2275865)

Modified: FormEncode/trunk/docs/news.txt
===================================================================
--- FormEncode/trunk/docs/news.txt      2008-11-14 23:10:44 UTC (rev 3652)
+++ FormEncode/trunk/docs/news.txt      2008-11-14 23:11:35 UTC (rev 3653)
@@ -11,6 +11,9 @@
 * In :mod:`formencode.htmlfill` use a default encoding of utf8 when
   handling mixed ``str``/``unicode`` content.
 
+* In :class:`formencode.validators.Email` allow single-character
+  domain names (like x.com).
+
 1.1
 ---
 

Modified: FormEncode/trunk/formencode/validators.py
===================================================================
--- FormEncode/trunk/formencode/validators.py   2008-11-14 23:10:44 UTC (rev 
3652)
+++ FormEncode/trunk/formencode/validators.py   2008-11-14 23:11:35 UTC (rev 
3653)
@@ -1299,7 +1299,7 @@
 
     usernameRE = re.compile(r"^[^ \t\n\r@<>()]+$", re.I)
     domainRE = re.compile(r'''
-        ^(?:[a-z0-9][a-z0-9\-]{1,62}\.)+ # (sub)domain - alpha followed by 
62max chars (63 total)
+        ^(?:[a-z0-9][a-z0-9\-]{0,62}\.)+ # (sub)domain - alpha followed by 
62max chars (63 total)
         [a-z]{2,}$                       # TLD
     ''', re.I | re.VERBOSE)
 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
FormEncode-CVS mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/formencode-cvs

Reply via email to