title: How to validate/clean() a unique=True field without using a ModelForm?
body: <p>In a custom Form, how does one validate a Model's field's uniqueness (i.e., has <code>unique=True</code> set)?</p>
  
  <p>I know that django's ModelForm automatically performs a <code>validate_unique()</code> function that is called within the BaseModelForm's <code>clean()</code> method -- so, when using ModelForm, this will be handled correctly (as it is in the Admin).  </p>
  
  <p>However, I am creating my own form from scratch and wonder how I can go about handling this myself?  I think my biggest stumbling block is knowing which object is attached to the form when the data is being cleaned ...</p>
  
  <p>Some code:</p>
  
  <pre><code>class UserProfile(CreatedModifiedModel):
      user            = models.ForeignKey(User, unique=True)
      display_name    = models.CharField('Display Name',max_length=30,
                          blank=True,unique=True)
  
  class EditUserProfileForm(forms.Form):
      display_name    = forms.CharField(required=False,max_length=30)
  
      # "notifications" are created from a different model, not the UserProfile
      notifications    = forms.MultipleChoiceField(
                          label="Email Notifications",
                          required=False,
                          widget=forms.CheckboxSelectMultiple,)
  
      def clean_display_name(self):
          # how do I run my own validate_unique() on this form?
          # how do I know which UserProfile object I am working with?
  
      # more code follows, including the __init__ which sets up the notifications
  </code></pre>