aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorTom Christie2014-11-10 12:32:03 +0000
committerTom Christie2014-11-10 12:32:03 +0000
commitfd7db776addbd5e30f132fe6846ec5c5caab5c40 (patch)
tree27d46462bca33a82152125ac1d12c23223d64dc4 /docs
parent8c1fa0b87d9c195420dd7a24c3bdf1b7d3295f1b (diff)
downloaddjango-rest-framework-fd7db776addbd5e30f132fe6846ec5c5caab5c40.tar.bz2
Bring UniqueValidator implementation in line with other uniquness validators.
Diffstat (limited to 'docs')
-rw-r--r--docs/api-guide/validators.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/docs/api-guide/validators.md b/docs/api-guide/validators.md
index bb073f57..a50636bc 100644
--- a/docs/api-guide/validators.md
+++ b/docs/api-guide/validators.md
@@ -16,9 +16,9 @@ Validation in Django REST framework serializers is handled a little differently
With `ModelForm` the validation is performed partially on the form, and partially on the model instance. With REST framework the validation is performed entirely on the serializer class. This is advantageous for the following reasons:
-* It introduces a proper separation of concerns, making your code behaviour more obvious.
-* It is easy to switch between using shortcut `ModelSerializer` classes and using explicit `Serializer` classes. Any validation behaviour being used for `ModelSerializer` is simple to replicate.
-* Printing the `repr` of a serializer instance will show you exactly what validation rules it applies. There's no extra hidden validation behaviour being called on the model instance.
+* It introduces a proper separation of concerns, making your code behavior more obvious.
+* It is easy to switch between using shortcut `ModelSerializer` classes and using explicit `Serializer` classes. Any validation behavior being used for `ModelSerializer` is simple to replicate.
+* Printing the `repr` of a serializer instance will show you exactly what validation rules it applies. There's no extra hidden validation behavior being called on the model instance.
When you're using `ModelSerializer` all of this is handled automatically for you. If you want to drop down to using a `Serializer` classes instead, then you need to define the validation rules explicitly.