Author: Honza_Kral Date: 2009-06-17 19:31:18 -0500 (Wed, 17 Jun 2009) New Revision: 11033
Modified: django/branches/soc2009/model-validation/django/forms/fields.py Log: [soc2009/model-validation] Do not run simple validators on empty values Modified: django/branches/soc2009/model-validation/django/forms/fields.py =================================================================== --- django/branches/soc2009/model-validation/django/forms/fields.py 2009-06-18 00:16:48 UTC (rev 11032) +++ django/branches/soc2009/model-validation/django/forms/fields.py 2009-06-18 00:31:18 UTC (rev 11033) @@ -121,6 +121,8 @@ raise ValidationError(self.error_messages['required']) def run_validators(self, value): + if value in validators.EMPTY_VALUES: + return errors = [] for v in self.validators: # don't run complex validators since they need all_values --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-updates@googlegroups.com To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---