Custom Form file upload validation


(gja) #1

Matrix Version: 5.3.4

Hi,

We have forms that require more than one file to be uploaded.
For example: q5 - CV and q10 - cover letter

Is it possible to have custom validation to check that the same document hasn’t been uploaded twice?

I’ve read the manual and it is unclear if this is possible.

Any tips or suggestions as to how it could be achieved?

Thanks Georgina.


(Bart Banda) #2

Not fully, as in, you could maybe check that the file name isn’t the same, but not anything else.

You could add some additional custom JS validation using the HTML5 File API and do some checks on file name, size and type and if they all match, show a warning to the user asking them if they are uploading the same file, because they might not always be.