def validate_unique(self):
        """
        Calls the instance's validate_unique() method and updates the form's
        validation errors if any were raised.
        """
        exclude = self._get_validation_exclusions()
        try:
            self.instance.validate_unique(exclude=exclude)
        except __HOLE__, e:
            self._update_errors(e.message_dict)
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/django/forms/models.py/BaseModelForm.validate_unique