Closed kaimikael closed 6 years ago
This is a normal behaviour, any files attached to the form would be reset after submission (even if that one fails). The temporary uploaded version of the file would be removed.
The only way would be to do that over AJAX, but that would be a noticeable change.
Can we then at least add a warning that any images have to be re-added?
Would need to check if that could be easily adde into the flow, but should be doable.
Should just require additional text to the error message given, I think.
System needs to detect that images file was present, validation failed and file has been removed. Then make sure to notify the form about that. Then the message would be shown.
This is just from the top of my head without consulting with the codebase.
But in essence, yes, something like that.
Oh, I could imagine something as simple as: “If you had added any pictures, you have to add them again. Sorry.”
Well, seems that your solution is way better. It does not have to make the checks for picture being present. Just the one for the validator. If any issues are present, then show the message.
This would be way easier and faster to implement.
Simple does not seem to be my thing, especially in the evening.
Do let me know if the simple solution is fine by you.
Oh, absolutely. We can add refinements later on, as and when there is time. One such solution I was thinking of—would it be possible to deactivate the Save button until all mandatory fields have been filled in?
That is possible, but validation could bark on more things than just missing value. A few examples would be: unacceptable image format and value that does not comply to the validator logic.
We will start small and see where it gets us.