Skip to main content

How to validate file input on a File Upload widget


In a Web application, how do I validate if the user selected a file on the Upload Widget?


On the action that processes the file upload, check if the Filename property is not empty.

If the user does not upload a file, the example below provides a feedback message and interrupts the process.

file upload.png

Unlike other widgets, the File Upload Widget doesn't have Valid or Validation Message properties. Check the Filename property instead.