dealertrack / django-rest-framework-braces

Collection of utilities for working with django rest framework (DRF)
Other
73 stars 20 forks source link

field validation errors not always formatted properly #10

Open macie-korte opened 8 years ago

macie-korte commented 8 years ago

Error strings with format markers do not always have the proper variables substituted in in the errors dictionary.

For example, this validation error message comes back from a ChoiceField after serializer validation is done. From example_serializer.errors:

  {
    "some_type": [
      "Select a valid choice. %(value)s is not one of the available choices."
    ]
  }