On Tuesday, August 19, 2014 4:49:10 PM UTC-5, Chris Foresman wrote:

>
>
> On Monday, August 18, 2014 12:05:55 PM UTC-5, Florian Apolloner wrote:
>>
>> Validation errors are only caught inside form validation. Forms set the 
>> password usually in save, not in clean, so I don't think that patch covers 
>> it (or at least the relevant forms have to call validate_password in clean 
>> too)
>>
>
> Is there a way to enforce that the validation calls `check_password`? 
> Maybe create a `forms.PasswordField`? 
>


Or maybe the solution is to define a `check_password` function on your 
model, and pass that in as a keyword option for the field declaration.

```python
class RegistrationForm(forms.Form):
    password = forms.PasswordField(validator='user.MyUser.check_password')
    ...
```

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/434ced60-671a-450d-8be0-3b5a32ee4c7f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to