You access the data from either the field's clean() method, or from the form's clean() method. clean() is the function that determines whether the form is valid or not. It's called when is_valid() is called. In form's clean() you have the cleaned_data
list when you can run through custom code to make sure it's all checked out. In the widget, you have a clean() also, but it uses a single passed variable. In order to access the field's clean() method, you'll have to subclass it. e.g.:
class BlankIntField(forms.IntegerField):
def clean(self, value):
if not value:
value = 0
return int(value)
If you want an IntField that doesn't choke on an empty value, for instance, you'd use the above.
clean() on a form kind of works like this:
def clean(self):
if self.cleaned_data.get('total',-1) <= 0.0:
raise forms.ValidationError("'Total must be positive")
return self.cleaned_data
Also you can have a clean_FIELD() function for each field so you can validate each field individually (after the field's clean() is called)