#11496: max_value validation is inconsistant -----------------------------------------+---------------------------------- Reporter: bobbo...@gmail.com | Owner: nobody Status: new | Milestone: Component: Forms | Version: 1.0 Resolution: | Keywords: max_value Stage: Unreviewed | Has_patch: 0 Needs_docs: 0 | Needs_tests: 0 Needs_better_patch: 0 | -----------------------------------------+---------------------------------- Changes (by kmtracey):
* milestone: 1.0.3 => Comment: Removing milestone as an unconfirmed problem should not block a bug-fix release. As for investigating this -- there's not enough information here to recreate as the Batch model upon which your model form is based is missing. Also you say "sometimes" you encounter this problem, so I'm guessing even with full information it will be hard to recreate. The code involved here is in django/forms/fields.py and the case where this error message is raised is straightforward: {{{ #!python if self.max_value is not None and value > self.max_value: raise ValidationError(self.error_messages['max_value'] % self.max_value) }}} As a first step I would probably change that error message and the code here that constructs it to also print the value being tested against, as that might give a clue what has gone wrong in the cases where you are seeing the problem. -- Ticket URL: <http://code.djangoproject.com/ticket/11496#comment:2> Django <http://code.djangoproject.com/> The Web framework for perfectionists with deadlines. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---