mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-26 03:23:59 +03:00
Merge pull request #3090 from alasdairnicol/2900
Fixed #2900 -- Made example validator class in docs inherit from object
This commit is contained in:
commit
ca455fc80f
|
@ -204,7 +204,7 @@ A validator may be any callable that raises a `serializers.ValidationError` on f
|
||||||
|
|
||||||
To write a class based validator, use the `__call__` method. Class based validators are useful as they allow you to parameterize and reuse behavior.
|
To write a class based validator, use the `__call__` method. Class based validators are useful as they allow you to parameterize and reuse behavior.
|
||||||
|
|
||||||
class MultipleOf:
|
class MultipleOf(object):
|
||||||
def __init__(self, base):
|
def __init__(self, base):
|
||||||
self.base = base
|
self.base = base
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user