On Sat, Jan 9, 2010 at 6:25 PM, Ivan Sagalaev
<[email protected]> wrote:
> Joseph Kocherhans wrote:
>>
>>            # Run validation that was missed by the form.
>>            p.validate_fields(fields=['user', 'primary_contact'])
>>            p.validate_unique(fields=['user', 'primary_contact'])
>>            p.validate()
>
> Can this be shortcut to
>
>    p.full_validate(fields=['user', 'primary_contact'])
>
> ?
>
> If not, why not? :-)

Hmm... I guess I'm -0. The caveats with that validate_unique method
are such that I'd rather not abstract it behind something else. I
don't think you'd want to pass the same fields to validate_fields and
validate_unique in most cases. Also, it doesn't make a whole lot of
sense to call validate unless you're validating everything, so we'd
have to document that as well. In practice, I don't think people will
do this a whole lot, so 3 method calls shouldn't be a big deal. We can
always add it later if people really need it in practice.

Joseph
-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.


Reply via email to