From 1b248ee7de0c0d3a071fcbe538fd43d6901929e0 Mon Sep 17 00:00:00 2001 From: w- Date: Thu, 14 Mar 2013 16:56:48 -0700 Subject: [PATCH] Update serializers.md doesn't look like there is a property called `.non_field_errors`. From use it looks like everything just gets bundled up in the errors property. --- docs/api-guide/serializers.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api-guide/serializers.md b/docs/api-guide/serializers.md index de2cf7d8f..347e428a3 100644 --- a/docs/api-guide/serializers.md +++ b/docs/api-guide/serializers.md @@ -91,7 +91,7 @@ To serialize a queryset instead of an object instance, you should pass the `many ## Validation -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 deserializing data, you always need to call `is_valid()` before attempting to access the deserialized object. If any validation errors occur, the `.errors` property will contain the resulting error messages (including non field errors). 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.