Merge branch 'jshirley-master'
This commit is contained in:
commit
394334fbea
1
AUTHORS
1
AUTHORS
@ -207,3 +207,4 @@ that much better:
|
|||||||
* Bruno Rocha (https://github.com/rochacbruno)
|
* Bruno Rocha (https://github.com/rochacbruno)
|
||||||
* Norberto Leite (https://github.com/nleite)
|
* Norberto Leite (https://github.com/nleite)
|
||||||
* Bob Cribbs (https://github.com/bocribbz)
|
* Bob Cribbs (https://github.com/bocribbz)
|
||||||
|
* Jay Shirley (https://github.com/jshirley)
|
||||||
|
@ -46,6 +46,7 @@ Changes in 0.9.X - DEV
|
|||||||
- Workaround a dateutil bug #608
|
- Workaround a dateutil bug #608
|
||||||
- Conditional save for atomic-style operations #511
|
- Conditional save for atomic-style operations #511
|
||||||
- Allow dynamic dictionary-style field access #559
|
- Allow dynamic dictionary-style field access #559
|
||||||
|
- Increase email field length to accommodate new TLDs #726
|
||||||
- index_cls is ignored when deciding to set _cls as index prefix #733
|
- index_cls is ignored when deciding to set _cls as index prefix #733
|
||||||
- Allow atomic update for the entire `DictField` #742
|
- Allow atomic update for the entire `DictField` #742
|
||||||
|
|
||||||
|
@ -160,8 +160,8 @@ class EmailField(StringField):
|
|||||||
r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"
|
r"(^[-!#$%&'*+/=?^_`{}|~0-9A-Z]+(\.[-!#$%&'*+/=?^_`{}|~0-9A-Z]+)*"
|
||||||
# quoted-string
|
# quoted-string
|
||||||
r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"'
|
r'|^"([\001-\010\013\014\016-\037!#-\[\]-\177]|\\[\001-011\013\014\016-\177])*"'
|
||||||
# domain
|
# domain (max length of an ICAAN TLD is 22 characters)
|
||||||
r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,253}[A-Z0-9])?\.)+[A-Z]{2,6}$', re.IGNORECASE
|
r')@(?:[A-Z0-9](?:[A-Z0-9-]{0,253}[A-Z0-9])?\.)+[A-Z]{2,22}$', re.IGNORECASE
|
||||||
)
|
)
|
||||||
|
|
||||||
def validate(self, value):
|
def validate(self, value):
|
||||||
|
@ -2927,6 +2927,9 @@ class FieldTest(unittest.TestCase):
|
|||||||
"aJIazqqWkm7.net"))
|
"aJIazqqWkm7.net"))
|
||||||
self.assertTrue(user.validate() is None)
|
self.assertTrue(user.validate() is None)
|
||||||
|
|
||||||
|
user = User(email="new-tld@example.technology")
|
||||||
|
self.assertTrue(user.validate() is None)
|
||||||
|
|
||||||
user = User(email='me@localhost')
|
user = User(email='me@localhost')
|
||||||
self.assertRaises(ValidationError, user.validate)
|
self.assertRaises(ValidationError, user.validate)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user