Add new lookup arg to docs for UniqueValidator

This commit is contained in:
Rowan Seymour 2016-10-04 13:36:56 +02:00
parent b4d138002f
commit edf652296b

View File

@ -61,6 +61,7 @@ It takes a single required argument, and an optional `messages` argument:
* `queryset` *required* - This is the queryset against which uniqueness should be enforced.
* `message` - The error message that should be used when validation fails.
* `lookup` - The lookup used to find an existing instance with the value being validated. Defaults to `'exact'`.
This validator should be applied to *serializer fields*, like so: