First time you access form.errors, it will call form.full_clean.

But after looking at the code and not simply reading the doc, I agree
that is_valid should be a property. After the first call to is_valid,
the value won't change, even if a field is set to a non-valid value.

2016-10-11 15:49 GMT+02:00 Sven R. Kunze <[email protected]>:
> Am Dienstag, 11. Oktober 2016 15:03:21 UTC+2 schrieb ludovic coues:
>>
>> If I remember correctly, form.is_valid do the actual form validation
>> and return false in case of error.
>
>
> I don't know what counts as "actual form validation" but form.is_valid is
> "just" a wrapper on form.errors which is a property.
>
> cf.
> https://github.com/django/django/blob/3c447b108ac70757001171f7a4791f493880bf5b/django/forms/forms.py#L164
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django developers (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/bc3d0c3a-024a-4149-afde-6f34c99f53d2%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" 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 https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAEuG%2BTY-SjFvX8TgT%3Dd57fX0Z6P_bkp3nfLTUmRWKiC-US-qrQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to