caktus / django-sticky-uploads

Enhanced file input widget for Django which uploads the file in the background and retains value on form errors.
BSD 3-Clause "New" or "Revised" License
32 stars 9 forks source link

Send form errors in the JSON response #18

Closed vstoykov closed 8 years ago

vstoykov commented 8 years ago

This will make it easy to display errors in the front-end when we use custom form with some validation (for example file size or virus checking).

I know that validation need to be in real form, but by this way errors can be shown to the user before submit. For security validation need to be doubled (On the main form and on the custom upload form) but will improve user experience.

For now I was not made any changes in the JavaScript to show the errors sent from the back-end. This can be made later.

mlavin commented 8 years ago

I :heart: it. Thank you for contributing!