title: Django custom forms.clean() method not working
body: <p>I've been looking for an answer for a while, but i really don't know how this happens. I'm trying to make a form that receives 2 files, and I'm overriding the clean() method to check if the names and extensions are correct. This is what I have:</p>
  
  <pre><code>def clean(self):
    cleaned_data = super(UploadForm, self).clean()
    obs_filename = cleaned_data.get('obs').name.split('.')
    nav_filename = cleaned_data.get('nav').name.split('.')
    if obs_filename[0] != nav_filename[0] or [obs_filename[1], nav_filename[1]] != ['obs', 'nav']:
       raise forms.ValidationError('Filenames do not match.')
    if os.path.isfile(PROJECT_ROOT + '/data/unprocessed/' + '.'.join(obs_filename)) and os.path.isfile(PROJECT_ROOT + '/data/unprocessed/' + '.'.join(nav_filename)):
       raise forms.ValidationError('Files already exist.')
    return cleaned_data
  </code></pre>
  
  <p>The problem is, when I use this, the check for input doesn't work (the form submits without selecting any files). When I remove this code, it works fine.
  The call to <code>super(UploadForm, self).clean()</code> is the same as in the django documentation for custom clean() functions. I'm using django 1.4. Any thoughts?</p>
  
  <p>Thanks!</p>