mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-27 03:54:01 +03:00
Improve validate_<fieldname> fix
This commit is contained in:
parent
f0071dbccd
commit
69e62457ef
|
@ -227,7 +227,8 @@ class BaseSerializer(Field):
|
||||||
Run `validate_<fieldname>()` and `validate()` methods on the serializer
|
Run `validate_<fieldname>()` and `validate()` methods on the serializer
|
||||||
"""
|
"""
|
||||||
for field_name, field in self.fields.items():
|
for field_name, field in self.fields.items():
|
||||||
if field_name not in self._errors:
|
if field_name in self._errors:
|
||||||
|
continue
|
||||||
try:
|
try:
|
||||||
validate_method = getattr(self, 'validate_%s' % field_name, None)
|
validate_method = getattr(self, 'validate_%s' % field_name, None)
|
||||||
if validate_method:
|
if validate_method:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user