Re: Validation of dependent form fields

2010-06-14 Thread Dennis Kaarsemaker
On ma, 2010-06-14 at 11:26 -0700, Thomas Allen wrote: > Is there a way to assume one field to be invalid if another is? In the > form below, api_key can never be valid if location is not. The place to implement such checks is in the clean() method of the form, which is called after all the indivi

Validation of dependent form fields

2010-06-14 Thread Thomas Allen
Hi everyone, Is there a way to assume one field to be invalid if another is? In the form below, api_key can never be valid if location is not. import urllib, urllib2 from django import forms from websites.models import * KEY_PARAM = 'key' class WebsiteForm(forms.ModelForm): api_key = forms.C