aboutsummaryrefslogtreecommitdiffstats
path: root/docs/api-guide
diff options
context:
space:
mode:
authorTom Christie2013-03-08 14:45:25 -0800
committerTom Christie2013-03-08 14:45:25 -0800
commit775b4314eda853bbdfacab5cc5d3d0ec0e56a92e (patch)
tree61b27ea9e843742dabeccfdd49fcf75ec7ae8683 /docs/api-guide
parentc5b98f0d106758298edf045e7bb44ecd7e4b9629 (diff)
parent28ae26466e1b1493feeba19480c6eb148d603330 (diff)
downloaddjango-rest-framework-775b4314eda853bbdfacab5cc5d3d0ec0e56a92e.tar.bz2
Merge pull request #716 from tomchristie/list-deserialization
List deserialization
Diffstat (limited to 'docs/api-guide')
-rw-r--r--docs/api-guide/serializers.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md
index 6f1f2883..de2cf7d8 100644
--- a/docs/api-guide/serializers.md
+++ b/docs/api-guide/serializers.md
@@ -93,6 +93,8 @@ To serialize a queryset instead of an object instance, you should pass the `many
When deserializing data, you always need to call `is_valid()` before attempting to access the deserialized object. If any validation errors occur, the `.errors` and `.non_field_errors` properties will contain the resulting error messages.
+When deserialising a list of items, errors will be returned as a list of tuples. The first item in an error tuple will be the index of the item with the error in the original data; The second item in the tuple will be a dict with the individual errors for that item.
+
### Field-level validation
You can specify custom field-level validation by adding `.validate_<fieldname>` methods to your `Serializer` subclass. These are analagous to `.clean_<fieldname>` methods on Django forms, but accept slightly different arguments.