Closed tom-dalton-fanduel closed 5 years ago
I'm inclined to keep as is, as that's just the default behaviour of a file input field. And as Django doesn't auto save, you might think that the object had been saved when it hasn't.
Also, if you clicked "remove", you'd also need to show the error message again.
If you make the field
required=True
in the django form, and then submit the form, django correctly flags a field-level error on the form, which is displayed/rendered as a normal form error. So far so good.If you now choose a file, the progress bar shows, and a file is successfully uploaded, but the "this field is required" error message still shows next to it. It would be nice if a bit of JS could hide/remove any existing field errors when a new file is uploaded.