diff options
| author | Tom Christie | 2013-03-08 23:00:23 +0000 |
|---|---|---|
| committer | Tom Christie | 2013-03-08 23:00:23 +0000 |
| commit | 5e993f39294da5e8650c7ac21aeb3da02012b775 (patch) | |
| tree | d95dfd6c09b6d4b8dfc869f103cb59c65488dcac /docs/api-guide/serializers.md | |
| parent | 2596c12a21003d230beb101aa93ddf83a1995305 (diff) | |
| parent | 6c1fcc855a2d05732113ce260b8660a414e1961e (diff) | |
| download | django-rest-framework-5e993f39294da5e8650c7ac21aeb3da02012b775.tar.bz2 | |
Merge
Diffstat (limited to 'docs/api-guide/serializers.md')
| -rw-r--r-- | docs/api-guide/serializers.md | 2 |
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. |
