Blog Archive for February 22, 2011

Validate against instance in Django ModelForm

February 22, 2011

I have a Django model form, which displays a subset of fields on the object it is defined for.

I want to run some validatation, validating one of the fields on the form against one of the fields not on the form, but on the instance. Here's how you can …