tomchristie/django-rest-framework — pull request #900 by copitux (2013-05-29 11:26:41+00:00)
Title: Bugfix: Fix run validation layer with invalid data

Regarding of [DRF serializer validation docs](http://django-rest-framework.org/api-guide/serializers.html#validation) we could define ``validate_`` and ``validate`` methods to do an extra validation on the serializer.
Both methods assume it'll take a dict-like as a first argument, but it'll take ``None`` if the serializer was initialized with invalid data

*IMHO*, the validation layer have to be skipped in that case, to avoid ``if attrs:`` checks on the *validate* methods

As an easy example:

```python
# client.post('url', json.dumps('invalid data'), content_type='application/json')
# def post(self, request):
serializer_with_validation = ValidationSerializer(data=request.DATA)
serializer_with_validation.is_valid()
# 1. _errors
# 2. from_native
# 3. restore_fields detects invalid data
# 4. perform_validation fails
```