mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 01:26:53 +03:00
This reverts commit 614bd87b60
.
This commit is contained in:
parent
bf4c6e78d4
commit
b3d2753308
|
@ -271,7 +271,6 @@ A validator may be any callable that raises a `serializers.ValidationError` on f
|
|||
def even_number(value):
|
||||
if value % 2 != 0:
|
||||
raise serializers.ValidationError('This field must be an even number.')
|
||||
return value
|
||||
|
||||
#### Field-level validation
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user