mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-23 15:54:16 +03:00
Add possible solution for field validation error
This commit is contained in:
parent
dc1c57d595
commit
2250ab6418
|
@ -227,6 +227,7 @@ class BaseSerializer(Field):
|
|||
Run `validate_<fieldname>()` and `validate()` methods on the serializer
|
||||
"""
|
||||
for field_name, field in self.fields.items():
|
||||
if field_name not in self._errors:
|
||||
try:
|
||||
validate_method = getattr(self, 'validate_%s' % field_name, None)
|
||||
if validate_method:
|
||||
|
|
Loading…
Reference in New Issue
Block a user