> Bence, > > I think your problem is related to the second case described in > documentation about validation fields that depend on each other [1]. > > Just an observation about your design, if I may: I believe you should > explicitly set and store both addresses. You will ease user task by > providing a widget that will set the second address according the first, > activated or not by default (I prefer not as your helper offer a direct > one click "auto-fill" as you can encounter in many date fields with > "today" button). > > Regards > > [1]http://docs.djangoproject.com/en/dev/ref/forms/validation/#cleaning-a...
Many thanks! With inserting to the ErrorList, I could solve the problem: def clean(self): data = self.cleaned_data if not data.has_key('same'): if data['post_address'] == '': self.errors.update(post_address=ErrorList([_("required")])) Thanks again! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.