[eluser]axed[/eluser]
Ok I will try to explain myself a little better.
I have a form with two input fields (name and date) and a upload field (userfile) and I validate the input fields with the form validation class. This is no problem, it works as it should.
I'm also using the upload file class to validate and upload the userfile from the upload field. This is also working, but the problem is when one of the two input fields fails in validation and the upload field doesn't. Then the userfile have been uploaded but the input fields needs to be showed and filled in again.
Then the next time the form is submited with the same file, that file already exists on the server?
How is best practise to handle this. When usual form validation fails, then I don't want to upload the userfile. If I only want to validate the userfile, do I need to write my own function for this, can it not be done with the upload file class?