Django inline formset validation

Django -- Posted on Oct. 3, 2017

django inline formset validation

              
                class BaseInlineFormSet(forms.BaseInlineFormSet):
    def clean(self):
        if any(self.errors):
            return
        for form in self.forms:
                # your code 
                raise forms.ValidationError( 'error message ')
                  
   
            

Related Posts