mirror of
https://github.com/django/django.git
synced 2025-10-20 20:29:14 +00:00
[soc2009/model-validation] Make empty containers recognized for what they are - empty
git-svn-id: http://code.djangoproject.com/svn/django/branches/soc2009/model-validation@11432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6960b04915
commit
45112c21a6
@ -4,8 +4,8 @@ from django.core.exceptions import ValidationError
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.encoding import smart_unicode
|
||||
|
||||
# These values, if given to to_python(), will trigger the self.required check.
|
||||
EMPTY_VALUES = (None, '')
|
||||
# These values, if given to validate(), will trigger the self.required check.
|
||||
EMPTY_VALUES = (None, '', [], (), {})
|
||||
|
||||
def validate_integer(value):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user