> 1) pass_matched always return False > how can i compare two fields in my class???
def pass_matched(self): if self.fields['pass'] == self.fields['repass']: return True else: return False 1. use self.cleaned_data instead of self.fields 2. call pass_matched from a method called clean in your form or rename the method pass_matched to clean_repass See this for details: http://www.djangoproject.com/documentation/newforms/#custom-form-and-field-validation --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---