(self)
return self.cleaned_data['old_password']
Validate that the email is not already registered with another user
Validate that the email is not already registered with another user
Validate that the email is not already registered with another user
def clean_old_password(self):
        """ Validate that the email is not already registered with another user """
        if not self.user.check_password(self.cleaned_data['old_password']):
            raise django_forms.ValidationError(_(u'Invalid password.'))
        return self.cleaned_data['old_password']
def clean_old_password ( self ) : if not self . user . check_password ( self . cleaned_data [ 'old_password' ] ) : raise django_forms . ValidationError ( _ ( u'Invalid password.' ) ) return self . cleaned_data [ 'old_password' ]