I want to make (an HTML) \'file\' input element mandatory: something like
But it i
As of now in 2017, I am able to do this-
<input type='file' required />
and when you submit the form, it asks for file.
Thanks to HTML5, it is as easy as this:
Example:
<form> <input type='file' required /> <button type="submit"> Submit </button> </form>