[Solved]-Django: Display a custom error message for admin validation error

18👍

Without looking, it sounds like the admin is looking for an iterable as the value for field_name. Try:

raise ValidationError({'field_name': ["error message",]})

I think the admin expects any number of validation messages to be associated with each field on a form.

Leave a comment