Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hi, love the app. Work with validators was strange for me since app sends all data as one list while validators usually expect single element so I used custom interface for validators defined as an argument for MultiuploadField. Since version 1.11 django claim to use default validator for ImageField and in one of early releases they actually set it and it broke MultiImageField and such. Problem is the same: MultiuploadField send list to Image validators while they expect single element so something like

    def run_validators(self, value):
        value = value or []
        for item in value:
            super(MultiUploadMetaField, self).run_validators(item)

will allow MultiUploadMetaField to work out of box. cheers o/

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:6
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

illagrenancommented, Aug 16, 2017

Thanks @marojenka for your solution, I had the same issue. To expand your post, here is my full solution to run validators with multiple files:

# my_project/fields
from multiupload.fields import MultiImageField

class ValidatedMultiImageField(MultiImageField):
    def run_validators(self, value):
        value = value or []

        for item in value:
# usage in
class FooModelForm(forms.ModelForm):
    attachments = ValidatedMultiImageField()
    # ...
dreaquilcommented, Nov 8, 2021

Hi @marojenka,

I’m currently on Django 3.2 and django-multiupload 0.6.1. You’re right, #41 is identical as it is the issue that lead me to this one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Validation Definition & Meaning - Merriam-Webster
The meaning of VALIDATION is an act, process, or instance of validating; especially : the determination of the degree of validity of a ......
Read more >
Validation Definition & Meaning -
the act of confirming something as true or correct: The new method is very promising but requires validation through further testing.
Read more >
Validation - Wikipedia
Data validation, in computer science, ensuring that data inserted into an application satisfies defined formats and other input criteria · Forecast verification, ...
Read more >
What is Validation and Why Do I Need to Know? - Psych Central
Validation is the recognition and acceptance of another persons internal experience as being valid. Emotional validation is distinguished from ...
Read more >
VALIDATION | definition in the Cambridge English Dictionary
the feeling that other people approve of and accept you, or something that gives you this feeling: As human beings we crave validation...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found