title: Raise Validation Error In Pre_Save Using Django Rest Framework
body: <p>I am having difficulty raising a validation error using the Django Rest Framework.</p>
  
  <p>I have an owner field. The owner field needs to access the request object. The documentation suggests <a href="http://www.django-rest-framework.org/tutorial/4-authentication-and-permissions" rel="nofollow">using the following approach</a>:</p>
  
  <pre><code>def pre_save(self, obj):
      obj.owner = self.request.user
  </code></pre>
  
  <p>My problem is how to raise a validation error if this code fails. I tried raising an error inside the pre_save method, but this doesn't work properly. It actually results in an HTML response coming back from Django, rather than a message from the Django Rest Framework.</p>