'Validate that the old_password field is correct.'

def clean_old_password(self):

    old_password = self.cleaned_data['old_password']
    if (not self.user.check_password(old_password)):
        raise forms.ValidationError(self.error_messages['password_incorrect'], code='password_incorrect')
    return old_password
