title: How to use validators on FileField content
body: <p>In my model, I want to use a validator to analyze the content of a file, the thing I can not figure out is how to access the content of the file to parse through it as the file has not yet been saved (which is good) when the validators are running.</p>
  <p>I'm not understanding how to get the data from the <code>value</code> passed to the validator into a file (I assume I should use <code>tempfile</code>) so I can then open it and evaluate the data.</p>
  <p>Here's a simplified example, in my real code, I want to open the file and evaluate it with csv.</p>
  <p>in Models.py</p>
  <pre><code>class ValidateFile(object):
      ....
      def __call__(self, value):
          # value is the fieldfile object but its not saved
          # I believe I need to do something like:
          temp_file = tempfile.TemporaryFile()
          temp_file.write(value.read())
          # Check the data in temp_file
      ....
  
  class MyItems(models.Model):
      data = models.FileField(upload_to=get_upload_path,
                              validators=[FileExtensionValidator(allowed_extensions=['cv']),
                              ValidateFile()])
  </code></pre>
  <p>Thanks for the help!</p>