Topic: How can I make file uploads mandatory and ensure that validation messages are displayed when they are not provided?

studio77 priority asked 8 months ago

<div id="dnd-custom-height" class="file-upload-wrapper">
    <input type="file" id="cv" name="cv" class="file-upload-input" data-mdb-height="100" data-mdb-default-msg="<?= translate('Unesite CV') ?>" data-mdb-main-error="<?= translate('Došlo je do greške.') ?>" data-mdb-file-upload="file-upload" data-mdb-accepted-extensions=".docx, .pdf" data-mdb-format-error="<?= translate('Netačan format datoteke (tačan format .dock, .pdf)') ?>" required>


I want to make a file upload required when the form is submitted. Currently, it is required, but I don't receive any 'invalid class' or other necessary information to display an error message indicating that it needs to be filled out. So, it becomes required without any frontend message.

Thank you.

Kamila Pieńkowska staff answered 8 months ago

We do not support validation of the File Upload at the moment. We have plans to introduce this feature in the future.

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 3.2.0
  • Device: Desktop PC
  • Browser: Google Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No