mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-21 17:16:47 +03:00
docs: fix code example (#8880)
This commit is contained in:
parent
4abfa28e08
commit
34953774f3
|
@ -226,7 +226,7 @@ Individual fields on a serializer can include validators, by declaring them on t
|
|||
raise serializers.ValidationError('Not a multiple of ten')
|
||||
|
||||
class GameRecord(serializers.Serializer):
|
||||
score = IntegerField(validators=[multiple_of_ten])
|
||||
score = serializers.IntegerField(validators=[multiple_of_ten])
|
||||
...
|
||||
|
||||
Serializer classes can also include reusable validators that are applied to the complete set of field data. These validators are included by declaring them on an inner `Meta` class, like so:
|
||||
|
|
Loading…
Reference in New Issue
Block a user