Re: Custom validation in model formset

2010-10-11 Thread ringemup
try this... from django.forms import ValidationError ... for form in self.forms: ... raise ValidationError('whatever') On Oct 11, 1:32 pm, Duane Hilton wrote: > Changing forms to form brings a new error: > > *Exception Value: 'CandidateFeedForm' object has no attribute > 'Validation

Re: Custom validation in model formset

2010-10-11 Thread Duane Hilton
Changing forms to form brings a new error: *Exception Value: 'CandidateFeedForm' object has no attribute 'ValidationError'* Below is the view that is using the BaseCandFormSet code that I included in the original message. Maybe something is wrong in it? Thanks in advance for your suggestions. I'v

Re: Custom validation in model formset

2010-10-11 Thread Jonathan Barratt
? 11 ?.?. 2553 23:44 Duane Hilton ?: > Hi all, > > I'm trying to do some custom validation on a model formset, but I'm > not having good luck. Thank you in advance for your suggestions ... > > In my views, I have: > > class BaseCandFormSet(BaseModelFormSet): >def clean(self): >

Custom validation in model formset

2010-10-11 Thread Duane Hilton
Hi all, I'm trying to do some custom validation on a model formset, but I'm not having good luck. Thank you in advance for your suggestions ... In my views, I have: class BaseCandFormSet(BaseModelFormSet): def clean(self): super(BaseCandFormSet, self).clean() for form in self