Form validation relies on cleaned_data
nijel opened this issue · comments
Michal Čihař commented
Using cleaned_data
for validation is wrong. It contains processed data, so it will fail for anything more complex (for example
ModelChoiceField will have a model instance there,
JSONField will convert JSON string to a matching Python representation).
Problematic code:
Instead, it should look at data
(and files
if mosparo deals with those as well), what is the raw data as submitted in the form.
Matthias Zobrist commented