3 solutions

Solution 1

Input (File) is an HTML control, so you will need to run it as a server control and then validate it on the code-behind. If you don't want to set it a server control, you can validate it using JavaScript/jQuery in the client-side.
For instance,