On Mon, Apr 16, 2012 at 4:39 PM, Chris Seberino <[email protected]> wrote: > def clean_username(self): > > """ > custom validation > code > """ > > if "username" in self.cleaned_data: > username = self.cleaned_data["username"] > if USER.objects.filter(username = username): > raise VALID_ERROR("Username is not > available.") > > return self.cleaned_data
Field clean methods do not return cleaned_data dict, they return specific data from within that dict. https://docs.djangoproject.com/en/1.4/ref/forms/validation/#cleaning-a-specific-field-attribute Cheers Tom -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

