This site uses cookies and similar technologies.

If you don't change browser settings, you agree to it.

I understand

To validate that the file or image type which the users are trying to upload is the one you want add the following java script in the JS field which is revealed by pressing the little arrow in the bottom right corner of the Upload File or Upload Image fields:

$(document).ready(function () {
$('#name_of_your_field').change(function () {
var val = $(this).val().toLowerCase();
var regex = new RegExp("(.*?)\.(docx|doc|pdf|xls|xlsx|txt)$");
if(!(regex.test(val))) {
alert('Invalid file type. Allowed file types are: TXT, PDF, XLS, XLSX, DOC, DOCX.');
} }); });

Replace the #name_of_your_field with the name of your field.

Please note that this is not a real validation and it only checks the type, not the content of the file.