create validation for upload file not selected?

Hello All
i have an input user element ( upload file ) , and its required, i want to get an error message when a user click submit and didn’t select a file.

The article How to Use the Upload Button with Code will show you how the Upload button works and shows the different options.

Thanks for the reply,
i went through the codes, and i didnt see a place inside the code to where the file need to be uploaded.

and if you set the data set for the add file element , it will upload the photo when you click submit button.
and in my form what i want is i made one of the add file element as required, when the user click submit it i want to show a message that he/she didnt choose photo!


See the section Wire Upload Button