mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-07 13:54:47 +03:00
Add new lookup arg to docs for UniqueValidator
This commit is contained in:
parent
b4d138002f
commit
edf652296b
|
@ -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:
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user